]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use a less cryptic message for packet timestamp overflow
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 28 Sep 2024 09:38:35 +0000 (11:38 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 25 Mar 2025 11:13:21 +0000 (12:13 +0100)
In ts_date_hmsfrac_print() and ts_unix_print() replace
"[timestamp < 1970-01-01 00:00:00 UTC]"
by
"[timestamp overflow]".

(Wikipedia "Year 2038 problem" uses "overflow".)

(cherry picked from commit 3026b252ffa687822d637c6b9e77b52d33b8f9d3)

util-print.c

index cc6afefad09f50eeee33ca776f5b3c9661c2dadf..fcf72ffd872a729b3db3eff42ba57e7df754a606 100644 (file)
@@ -251,7 +251,7 @@ ts_date_hmsfrac_print(netdissect_options *ndo, const struct timeval *tv,
        const char *timestr;
 
        if (tv->tv_sec < 0) {
-               ND_PRINT("[timestamp < 1970-01-01 00:00:00 UTC]");
+               ND_PRINT("[timestamp overflow]");
                return;
        }
 
@@ -279,7 +279,7 @@ static void
 ts_unix_print(netdissect_options *ndo, const struct timeval *tv)
 {
        if (tv->tv_sec < 0) {
-               ND_PRINT("[timestamp < 1970-01-01 00:00:00 UTC]");
+               ND_PRINT("[timestamp overflow]");
                return;
        }