From: Francois-Xavier Le Bail Date: Tue, 3 Sep 2024 13:54:30 +0000 (+0200) Subject: TCP: Note if the Urgent Pointer is non-zero while URG flag not set X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/ebe4b9f1be73a0af34508009d3b1d0139e6adfda?ds=inline TCP: Note if the Urgent Pointer is non-zero while URG flag not set If the verbose level is > 1 (option -vv and more). Add a test case (existing pcap printed with -vv). --- diff --git a/CHANGES b/CHANGES index 7c027036..d81492c7 100644 --- 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 diff --git a/print-tcp.c b/print-tcp.c index 161f17e7..84442eb2 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -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. */ diff --git a/tests/TESTLIST b/tests/TESTLIST index e1730a93..b316aa9d 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -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 index 00000000..64945d98 --- /dev/null +++ b/tests/rpki-rtr-oobr-vv.out @@ -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)