]> 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)
committerfxlb <[email protected]>
Mon, 24 Mar 2025 20:06:16 +0000 (20:06 +0000)
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".)

util-print.c

index beeb4f4a8c7dedf89a63b37265daa67b37b790bd..594327012e8626e7b3cb04f77fdd3120be468308 100644 (file)
@@ -254,7 +254,7 @@ ts_date_hmsfrac_print(netdissect_options *ndo, const struct timeval *tv,
 #endif
 
        if (tv->tv_sec < 0) {
-               ND_PRINT("[timestamp < 1970-01-01 00:00:00 UTC]");
+               ND_PRINT("[timestamp overflow]");
                return;
        }
 
@@ -295,7 +295,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;
        }