]> The Tcpdump Group git mirrors - tcpdump/commitdiff
NTP: Fix p_ntp_time_fmt() using epoch 1/epoch 2 convention (RFC 4330)
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 31 Mar 2024 09:38:44 +0000 (11:38 +0200)
committerfxlb <[email protected]>
Fri, 28 Mar 2025 14:44:07 +0000 (14:44 +0000)
Moreover:
Update the error message, replace
"[Time is too large to fit into a time_t]"
by
"[timestamp overflow]".
Same as in ts_date_hmsfrac_print() and ts_unix_print().

Fix indentation.

Update 5 test outputs and processings, based on skip_time_t_not (64).

(backported from commit 801a7c1d641766e5117715d28e2aa8639becadd4)

ntp.c
tests/TESTLIST
tests/lspping-fec-ldp-v.out
tests/lspping-fec-ldp-vv.out
tests/lspping-fec-rsvp-v.out
tests/lspping-fec-rsvp-vv.out
tests/ntp-v.out
tests/time.tests

diff --git a/ntp.c b/ntp.c
index c9d60fae3a9732b14a1de2af080e726614843762..d1825664bbc7cb565c388b80ba64c0f1f8db3f8a 100644 (file)
--- a/ntp.c
+++ b/ntp.c
 
 #include "extract.h"
 
-#define        JAN_1970        INT64_C(2208988800)     /* 1970 - 1900 in seconds */
+/* NTP epoch 1: January 1, 1900, 00:00:00 UTC. */
+#define DIFF_1970_1900 INT64_C(2208988800) /* 1970 - 1900 in seconds */
+/* RFC4330 - 3. NTP Timestamp Format - 6h 28m 16s UTC on 7 February 2036 */
+/* NTP epoch 2: February 7, 2036, 06:28:16 UTC. */
+#define DIFF_2036_1970 INT64_C(2085978496) /* 2036 - 1970 in seconds */
 
 void
 p_ntp_time_fmt(netdissect_options *ndo, const char *fmt,
@@ -50,21 +54,25 @@ p_ntp_time_fmt(netdissect_options *ndo, const char *fmt,
         * print the UTC time in human-readable format.
         */
        if (i) {
-           int64_t seconds_64bit = (int64_t)i - JAN_1970;
+           int64_t seconds_64bit;
            time_t seconds;
            char time_buf[128];
            const char *time_string;
 
+           if ((i & 0x80000000) != 0)
+               seconds_64bit = (int64_t)i - DIFF_1970_1900;
+           else
+               seconds_64bit = (int64_t)i + DIFF_2036_1970;
            seconds = (time_t)seconds_64bit;
            if (seconds != seconds_64bit) {
                /*
                 * It doesn't fit into a time_t, so we can't hand it
                 * to gmtime.
                 */
-               time_string = "[Time is too large to fit into a time_t]";
+               time_string = "[timestamp overflow]";
            } else {
                time_string = nd_format_time(time_buf, sizeof (time_buf),
-                 fmt, gmtime(&seconds));
+                                            fmt, gmtime(&seconds));
            }
            ND_PRINT(" (%s)", time_string);
        }
index b5dd42c2c1c6b5142422ac121fb6878e696e38d4..741c368bab16a3f3832202c5e8af5f6f41f98247 100644 (file)
@@ -93,11 +93,9 @@ mpls-ldp-hello       mpls-ldp-hello.pcap     mpls-ldp-hello.out -v
 ldp-common-session ldp-common-session.pcap ldp-common-session.out -v
 ldp_infloop    ldp-infinite-loop.pcap  ldp_infloop.out
 lspping-fec-ldp    lspping-fec-ldp.pcap lspping-fec-ldp.out
-lspping-fec-ldp-v  lspping-fec-ldp.pcap lspping-fec-ldp-v.out -v
-lspping-fec-ldp-vv lspping-fec-ldp.pcap lspping-fec-ldp-vv.out -vv
+# Tests with -v and -vv are now in time.tests skipped if not HAVE_TIME_T_64
 lspping-fec-rsvp    lspping-fec-rsvp.pcap lspping-fec-rsvp.out
-lspping-fec-rsvp-v  lspping-fec-rsvp.pcap lspping-fec-rsvp-v.out -v
-lspping-fec-rsvp-vv lspping-fec-rsvp.pcap lspping-fec-rsvp-vv.out -vv
+# Tests with -v and -vv are now in time.tests skipped if not HAVE_TIME_T_64
 mpls-traceroute   mpls-traceroute.pcap mpls-traceroute.out
 mpls-traceroute-v mpls-traceroute.pcap mpls-traceroute-v.out -v
 mpls-over-udp  mpls-over-udp.pcap  mpls-over-udp.out
@@ -805,7 +803,7 @@ dns-zlip-3          dns-zlip-3.pcap         dns-zlip-3.out
 
 # NTP tests
 ntp                    ntp.pcap                ntp.out
-ntp-v                  ntp.pcap                ntp-v.out               -v
+# Test with -v is now in time.tests skipped if not HAVE_TIME_T_64
 ntp-time               ntp-time.pcap           ntp-time.out
 ntp-time--v            ntp-time.pcap           ntp-time--v.out         -v
 ntp-control            ntp-control.pcap        ntp-control.out
index 4b9a8886753fe09c574471168d24e5d72dc95dbe..66296287b382c62aeb9ebb417bc7dba13a04a4a9 100644 (file)
@@ -10,7 +10,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208228.000027564 (1934-06-15T10:17:08Z)
+         TimeStamp Sent: 1087208228.000027564 (2070-07-21T16:45:24Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -22,8 +22,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208228.000027564 (1934-06-15T10:17:08Z)
-         TimeStamp Received: 1087208228.000027928 (1934-06-15T10:17:08Z)
+         TimeStamp Sent: 1087208228.000027564 (2070-07-21T16:45:24Z)
+         TimeStamp Received: 1087208228.000027928 (2070-07-21T16:45:24Z)
     4  2004-06-14 10:17:08.878375 MPLS (label 100704, tc 6, [S], ttl 64)
        IP (tos 0xc0, ttl 64, id 40725, offset 0, flags [none], proto TCP (6), length 71)
     12.4.4.4.2006 > 12.1.1.1.179: Flags [P.], cksum 0x6c0d (correct), seq 399708866:399708885, ack 708613212, win 16384, options [nop,nop,TS val 84784455 ecr 130411], length 19: BGP
@@ -39,7 +39,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208229.000029880 (1934-06-15T10:17:09Z)
+         TimeStamp Sent: 1087208229.000029880 (2070-07-21T16:45:25Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -51,8 +51,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208229.000029880 (1934-06-15T10:17:09Z)
-         TimeStamp Received: 1087208229.000030186 (1934-06-15T10:17:09Z)
+         TimeStamp Sent: 1087208229.000029880 (2070-07-21T16:45:25Z)
+         TimeStamp Received: 1087208229.000030186 (2070-07-21T16:45:25Z)
     8  2004-06-14 10:17:10.128607 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40729, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: 
@@ -61,7 +61,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208230.000029928 (1934-06-15T10:17:10Z)
+         TimeStamp Sent: 1087208230.000029928 (2070-07-21T16:45:26Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -73,8 +73,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208230.000029928 (1934-06-15T10:17:10Z)
-         TimeStamp Received: 1087208230.000030250 (1934-06-15T10:17:10Z)
+         TimeStamp Sent: 1087208230.000029928 (2070-07-21T16:45:26Z)
+         TimeStamp Received: 1087208230.000030250 (2070-07-21T16:45:26Z)
    10  2004-06-14 10:17:11.128577 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40731, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: 
@@ -83,7 +83,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208231.000029918 (1934-06-15T10:17:11Z)
+         TimeStamp Sent: 1087208231.000029918 (2070-07-21T16:45:27Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -95,8 +95,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208231.000029918 (1934-06-15T10:17:11Z)
-         TimeStamp Received: 1087208231.000030237 (1934-06-15T10:17:11Z)
+         TimeStamp Sent: 1087208231.000029918 (2070-07-21T16:45:27Z)
+         TimeStamp Received: 1087208231.000030237 (2070-07-21T16:45:27Z)
    12  2004-06-14 10:17:12.128655 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40733, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: 
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208232.000029937 (1934-06-15T10:17:12Z)
+         TimeStamp Sent: 1087208232.000029937 (2070-07-21T16:45:28Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208232.000029937 (1934-06-15T10:17:12Z)
-         TimeStamp Received: 1087208232.000030273 (1934-06-15T10:17:12Z)
+         TimeStamp Sent: 1087208232.000029937 (2070-07-21T16:45:28Z)
+         TimeStamp Received: 1087208232.000030273 (2070-07-21T16:45:28Z)
index e641c0c5352c566212055409e478a97f741458cf..76b33b6147889dac9234e25c339499ba1c4adafb 100644 (file)
@@ -10,7 +10,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208228.000027564 (1934-06-15T10:17:08Z)
+         TimeStamp Sent: 1087208228.000027564 (2070-07-21T16:45:24Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -24,8 +24,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208228.000027564 (1934-06-15T10:17:08Z)
-         TimeStamp Received: 1087208228.000027928 (1934-06-15T10:17:08Z)
+         TimeStamp Sent: 1087208228.000027564 (2070-07-21T16:45:24Z)
+         TimeStamp Received: 1087208228.000027928 (2070-07-21T16:45:24Z)
     4  2004-06-14 10:17:08.878375 MPLS (label 100704, tc 6, [S], ttl 64)
        IP (tos 0xc0, ttl 64, id 40725, offset 0, flags [none], proto TCP (6), length 71)
     12.4.4.4.2006 > 12.1.1.1.179: Flags [P.], cksum 0x6c0d (correct), seq 399708866:399708885, ack 708613212, win 16384, options [nop,nop,TS val 84784455 ecr 130411], length 19: BGP
@@ -41,7 +41,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208229.000029880 (1934-06-15T10:17:09Z)
+         TimeStamp Sent: 1087208229.000029880 (2070-07-21T16:45:25Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -55,8 +55,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208229.000029880 (1934-06-15T10:17:09Z)
-         TimeStamp Received: 1087208229.000030186 (1934-06-15T10:17:09Z)
+         TimeStamp Sent: 1087208229.000029880 (2070-07-21T16:45:25Z)
+         TimeStamp Received: 1087208229.000030186 (2070-07-21T16:45:25Z)
     8  2004-06-14 10:17:10.128607 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40729, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: [udp sum ok] 
@@ -65,7 +65,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208230.000029928 (1934-06-15T10:17:10Z)
+         TimeStamp Sent: 1087208230.000029928 (2070-07-21T16:45:26Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
@@ -79,8 +79,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208230.000029928 (1934-06-15T10:17:10Z)
-         TimeStamp Received: 1087208230.000030250 (1934-06-15T10:17:10Z)
+         TimeStamp Sent: 1087208230.000029928 (2070-07-21T16:45:26Z)
+         TimeStamp Received: 1087208230.000030250 (2070-07-21T16:45:26Z)
    10  2004-06-14 10:17:11.128577 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40731, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: [udp sum ok] 
@@ -89,7 +89,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208231.000029918 (1934-06-15T10:17:11Z)
+         TimeStamp Sent: 1087208231.000029918 (2070-07-21T16:45:27Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208231.000029918 (1934-06-15T10:17:11Z)
-         TimeStamp Received: 1087208231.000030237 (1934-06-15T10:17:11Z)
+         TimeStamp Sent: 1087208231.000029918 (2070-07-21T16:45:27Z)
+         TimeStamp Received: 1087208231.000030237 (2070-07-21T16:45:27Z)
    12  2004-06-14 10:17:12.128655 MPLS (label 100688, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40733, offset 0, flags [none], proto UDP (17), length 76)
     12.4.4.4.4786 > 127.0.0.1.3503: [udp sum ok] 
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208232.000029937 (1934-06-15T10:17:12Z)
+         TimeStamp Sent: 1087208232.000029937 (2070-07-21T16:45:28Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 12
            LDP IPv4 prefix subTLV (1), length: 5
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208232.000029937 (1934-06-15T10:17:12Z)
-         TimeStamp Received: 1087208232.000030273 (1934-06-15T10:17:12Z)
+         TimeStamp Sent: 1087208232.000029937 (2070-07-21T16:45:28Z)
+         TimeStamp Received: 1087208232.000030273 (2070-07-21T16:45:28Z)
index 2b9d51358fbd5fb301a590d853a3f2182572e508..4b5ee2aef71474c3e5a210e402aff6b35380c3fa 100644 (file)
@@ -6,7 +6,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208037.000131030 (1934-06-15T10:13:57Z)
+         TimeStamp Sent: 1087208037.000131030 (2070-07-21T16:42:13Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -19,8 +19,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208037.000131030 (1934-06-15T10:13:57Z)
-         TimeStamp Received: 1087208037.000131348 (1934-06-15T10:13:57Z)
+         TimeStamp Sent: 1087208037.000131030 (2070-07-21T16:42:13Z)
+         TimeStamp Received: 1087208037.000131348 (2070-07-21T16:42:13Z)
     3  2004-06-14 10:13:58.572787 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40271, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: 
@@ -29,7 +29,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208038.000133345 (1934-06-15T10:13:58Z)
+         TimeStamp Sent: 1087208038.000133345 (2070-07-21T16:42:14Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -42,8 +42,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208038.000133345 (1934-06-15T10:13:58Z)
-         TimeStamp Received: 1087208038.000136480 (1934-06-15T10:13:58Z)
+         TimeStamp Sent: 1087208038.000133345 (2070-07-21T16:42:14Z)
+         TimeStamp Received: 1087208038.000136480 (2070-07-21T16:42:14Z)
     5  2004-06-14 10:13:59.572866 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40273, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: 
@@ -52,7 +52,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208039.000133363 (1934-06-15T10:13:59Z)
+         TimeStamp Sent: 1087208039.000133363 (2070-07-21T16:42:15Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -65,8 +65,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208039.000133363 (1934-06-15T10:13:59Z)
-         TimeStamp Received: 1087208039.000133684 (1934-06-15T10:13:59Z)
+         TimeStamp Sent: 1087208039.000133363 (2070-07-21T16:42:15Z)
+         TimeStamp Received: 1087208039.000133684 (2070-07-21T16:42:15Z)
     7  2004-06-14 10:14:00.572959 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40275, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: 
@@ -75,7 +75,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208040.000133384 (1934-06-15T10:14:00Z)
+         TimeStamp Sent: 1087208040.000133384 (2070-07-21T16:42:16Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -88,8 +88,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208040.000133384 (1934-06-15T10:14:00Z)
-         TimeStamp Received: 1087208040.000133697 (1934-06-15T10:14:00Z)
+         TimeStamp Sent: 1087208040.000133384 (2070-07-21T16:42:16Z)
+         TimeStamp Received: 1087208040.000133697 (2070-07-21T16:42:16Z)
     9  2004-06-14 10:14:01.573010 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40278, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: 
@@ -98,7 +98,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208041.000133401 (1934-06-15T10:14:01Z)
+         TimeStamp Sent: 1087208041.000133401 (2070-07-21T16:42:17Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208041.000133401 (1934-06-15T10:14:01Z)
-         TimeStamp Received: 1087208041.000133707 (1934-06-15T10:14:01Z)
+         TimeStamp Sent: 1087208041.000133401 (2070-07-21T16:42:17Z)
+         TimeStamp Received: 1087208041.000133707 (2070-07-21T16:42:17Z)
index 537adaaa38c661bbe35dfc899c57fffa0757bf73..efac7e4934724d4a8467166c45982e1f9047b538 100644 (file)
@@ -6,7 +6,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208037.000131030 (1934-06-15T10:13:57Z)
+         TimeStamp Sent: 1087208037.000131030 (2070-07-21T16:42:13Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -23,8 +23,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 1
-         TimeStamp Sent: 1087208037.000131030 (1934-06-15T10:13:57Z)
-         TimeStamp Received: 1087208037.000131348 (1934-06-15T10:13:57Z)
+         TimeStamp Sent: 1087208037.000131030 (2070-07-21T16:42:13Z)
+         TimeStamp Received: 1087208037.000131348 (2070-07-21T16:42:13Z)
     3  2004-06-14 10:13:58.572787 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40271, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: [udp sum ok] 
@@ -33,7 +33,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208038.000133345 (1934-06-15T10:13:58Z)
+         TimeStamp Sent: 1087208038.000133345 (2070-07-21T16:42:14Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -50,8 +50,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 2
-         TimeStamp Sent: 1087208038.000133345 (1934-06-15T10:13:58Z)
-         TimeStamp Received: 1087208038.000136480 (1934-06-15T10:13:58Z)
+         TimeStamp Sent: 1087208038.000133345 (2070-07-21T16:42:14Z)
+         TimeStamp Received: 1087208038.000136480 (2070-07-21T16:42:14Z)
     5  2004-06-14 10:13:59.572866 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40273, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: [udp sum ok] 
@@ -60,7 +60,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208039.000133363 (1934-06-15T10:13:59Z)
+         TimeStamp Sent: 1087208039.000133363 (2070-07-21T16:42:15Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
@@ -77,8 +77,8 @@
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 3
-         TimeStamp Sent: 1087208039.000133363 (1934-06-15T10:13:59Z)
-         TimeStamp Received: 1087208039.000133684 (1934-06-15T10:13:59Z)
+         TimeStamp Sent: 1087208039.000133363 (2070-07-21T16:42:15Z)
+         TimeStamp Received: 1087208039.000133684 (2070-07-21T16:42:15Z)
     7  2004-06-14 10:14:00.572959 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40275, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: [udp sum ok] 
@@ -87,7 +87,7 @@
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208040.000133384 (1934-06-15T10:14:00Z)
+         TimeStamp Sent: 1087208040.000133384 (2070-07-21T16:42:16Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 4
-         TimeStamp Sent: 1087208040.000133384 (1934-06-15T10:14:00Z)
-         TimeStamp Received: 1087208040.000133697 (1934-06-15T10:14:00Z)
+         TimeStamp Sent: 1087208040.000133384 (2070-07-21T16:42:16Z)
+         TimeStamp Received: 1087208040.000133697 (2070-07-21T16:42:16Z)
     9  2004-06-14 10:14:01.573010 MPLS (label 100704, tc 7, [S], ttl 255)
        IP (tos 0x0, ttl 64, id 40278, offset 0, flags [none], proto UDP (17), length 88)
     12.4.4.4.4529 > 127.0.0.1.3503: [udp sum ok] 
          Return Code: No return code or return code contained in the Error Code TLV (0)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208041.000133401 (1934-06-15T10:14:01Z)
+         TimeStamp Sent: 1087208041.000133401 (2070-07-21T16:42:17Z)
          TimeStamp Received: no timestamp
          Target FEC Stack TLV (1), length: 24
            RSVP IPv4 Session Query subTLV (3), length: 20
          Return Code: Replying router is an egress for the FEC at stack depth 0 (3)
          Return Subcode: (0)
          Sender Handle: 0x00000000, Sequence: 5
-         TimeStamp Sent: 1087208041.000133401 (1934-06-15T10:14:01Z)
-         TimeStamp Received: 1087208041.000133707 (1934-06-15T10:14:01Z)
+         TimeStamp Sent: 1087208041.000133401 (2070-07-21T16:42:17Z)
+         TimeStamp Received: 1087208041.000133707 (2070-07-21T16:42:17Z)
index dc73e901492b3717f7c32349d96b98578f8a96ee..a916289af6219d7529b50b6600f7911e2edc2460 100644 (file)
@@ -27,7 +27,7 @@
        Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec)
          Reference Timestamp:  0.000000000
          Originator Timestamp: 3706870757.473833108 (2017-06-19T14:19:17Z)
-         Receive Timestamp:    1802554105.693999877 (1957-02-13T21:28:25Z)
+         Receive Timestamp:    1802554105.693999877 (2093-03-22T03:56:41Z)
          Transmit Timestamp:   2929527464.107565978 (1992-10-31T13:37:44Z)
            Originator - Receive Timestamp:  -1904316651.779833231
            Originator - Transmit Timestamp: -777343293.366267130
index d8190630c1e96d733b2c8fcfc54ff8be5c943868..b0fd054c8871240370eb39e393044c2716cc6d99 100644 (file)
@@ -77,6 +77,41 @@ $testlist = [
         output => 'time_2107-tt.out',
         args   => '-tt -q SPECIAL_t'
     },
+    {
+        config_set => 'HAVE_TIME_T_64',
+        name => 'lspping-fec-ldp-v',
+        input => 'lspping-fec-ldp.pcap',
+        output => 'lspping-fec-ldp-v.out',
+        args => '-v'
+    },
+    {
+        config_set => 'HAVE_TIME_T_64',
+        name => 'lspping-fec-ldp-vv',
+        input => 'lspping-fec-ldp.pcap',
+        output => 'lspping-fec-ldp-vv.out',
+        args => '-vv'
+    },
+    {
+        config_set => 'HAVE_TIME_T_64',
+        name => 'lspping-fec-rsvp-v',
+        input => 'lspping-fec-rsvp.pcap',
+        output => 'lspping-fec-rsvp-v.out',
+        args => '-v'
+    },
+    {
+        config_set => 'HAVE_TIME_T_64',
+        name => 'lspping-fec-rsvp-vv',
+        input => 'lspping-fec-rsvp.pcap',
+        output => 'lspping-fec-rsvp-vv.out',
+        args => '-vv'
+    },
+    {
+        config_set => 'HAVE_TIME_T_64',
+        name => 'ntp-v',
+        input => 'ntp.pcap',
+        output => 'ntp-v.out',
+        args => '-v'
+    },
 ];
 
 1;