]> The Tcpdump Group git mirrors - tcpdump/commitdiff
TCP: Note if the Urgent Pointer is non-zero while URG flag not set
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 3 Sep 2024 13:54:30 +0000 (15:54 +0200)
committerfxlb <[email protected]>
Wed, 4 Sep 2024 15:33:22 +0000 (15:33 +0000)
If the verbose level is > 1 (option -vv and more).

Add a test case (existing pcap printed with -vv).

CHANGES
print-tcp.c
tests/TESTLIST
tests/rpki-rtr-oobr-vv.out [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index 7c027036aa8f36515a3e4f37eb3be7c97b9e1a9c..d81492c76231a9c6482174a65c3226740ad27c03 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -65,6 +65,8 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
   Summary for 4.99.6 tcpdump release (so far!)
     Refine protocol decoding for:
       IPv6: Add a missing comma and remove a colon in the output.
+      TCP: Note if the Urgent Pointer is non-zero while URG flag not set,
+           if the verbose level is > 1 (option -vv and more).
 
 Friday, August 30, 2024 / The Tcpdump Group
   Summary for 4.99.5 tcpdump release
index 161f17e726346bc48095e86d136c201347d519d7..84442eb2f388cca82033e536f616385987cae5b0 100644 (file)
@@ -433,6 +433,9 @@ tcp_print(netdissect_options *ndo,
 
         if (flags & TH_URG)
                 ND_PRINT(", urg %u", urp);
+        else
+                if (ndo->ndo_vflag > 1 && urp != 0)
+                        ND_PRINT(", [urg %u != 0 while URG flag not set]", urp);
         /*
          * Handle any options.
          */
index e1730a933dcebf658d3b24a69f4ae70079fc4ec7..b316aa9da05cc9533a0cfad3c3bcd65834cf984d 100644 (file)
@@ -783,6 +783,7 @@ rsvp_uni-oobr-1     rsvp_uni-oobr-1.pcap    rsvp_uni-oobr-1.out     -v
 rsvp_uni-oobr-2        rsvp_uni-oobr-2.pcap    rsvp_uni-oobr-2.out     -v
 rsvp_uni-oobr-3        rsvp_uni-oobr-3.pcap    rsvp_uni-oobr-3.out     -v
 rpki-rtr-oobr          rpki-rtr-oobr.pcap      rpki-rtr-oobr.out       -v
+rpki-rtr-oobr-vv       rpki-rtr-oobr.pcap      rpki-rtr-oobr-vv.out    -vv
 lldp_8023_mtu-oobr     lldp_8023_mtu-oobr.pcap lldp_8023_mtu-oobr.out  -v
 bgp_vpn_rt-oobr        bgp_vpn_rt-oobr.pcap    bgp_vpn_rt-oobr.out     -v -c1
 cfm_sender_id-oobr     cfm_sender_id-oobr.pcap cfm_sender_id-oobr.out  -v
diff --git a/tests/rpki-rtr-oobr-vv.out b/tests/rpki-rtr-oobr-vv.out
new file mode 100644 (file)
index 0000000..64945d9
--- /dev/null
@@ -0,0 +1,3 @@
+    1  1975-04-27 03:20:48.134349590 IP [total length 62 > length 50] (invalid) (tos 0x0, ttl 254, id 13327, offset 0, flags [+, DF, rsvd], proto TCP (6), length 62, bad cksum 8e7f (->c283)!)
+    19.128.128.20.323 > 76.19.6.127.49600: Flags [e], seq 2684354563:2684354585, win 28672, [urg 770 != 0 while URG flag not set], length 22
+       RPKI-RTRv171 (unknown)