]> The Tcpdump Group git mirrors - tcpdump/commitdiff
TCP: Note if the Acknowledgment Number is non-zero while ACK flag not set
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 3 Sep 2024 14:05:45 +0000 (16:05 +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).

Update the outputs of 2 tests accordingly.

CHANGES
print-tcp.c
tests/geneve-gcp.out
tests/rpki-rtr-oobr-vv.out

diff --git a/CHANGES b/CHANGES
index d81492c76231a9c6482174a65c3226740ad27c03..b100df4f49ca0e90819fe9eabc56c632713a005a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -67,6 +67,8 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
       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).
+      TCP: Note if the Acknowledgment Number is non-zero while ACK 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 84442eb2f388cca82033e536f616385987cae5b0..38f80d9b2336e05087ef5e556d769fc12a15d6be 100644 (file)
@@ -425,9 +425,11 @@ tcp_print(netdissect_options *ndo,
                 }
         }
 
-        if (flags & TH_ACK) {
+        if (flags & TH_ACK)
                 ND_PRINT(", ack %u", ack);
-        }
+        else
+                if (ndo->ndo_vflag > 1 && ack != 0)
+                        ND_PRINT(", [ack %u != 0 while ACK flag not set]", ack);
 
         ND_PRINT(", win %u", win);
 
index 9a632665efd2f49e842232a0dca81ff43faf813b..dd550061a74a4a65917f67aa0cb562e68ce54ce6 100644 (file)
@@ -1,4 +1,4 @@
     1  2022-03-21 10:31:03.250708 IP (tos 0x0, ttl 2, id 0, offset 0, flags [DF], proto UDP (17), length 116)
     192.168.100.254.62974 > 192.168.100.3.6081: [no cksum] Geneve, Flags [none], vni 0x0, options [class Google (0x132) type 0x1 len 8 data 800000d1, class Google (0x132) type 0x2 len 20 data 0800000d c0a86402 00000000 00000000, class Google (0x132) type 0x3 len 12 data 00000000 00001234]
        IP (tos 0x0, ttl 64, id 55620, offset 0, flags [none], proto TCP (6), length 40)
-    192.168.100.2.2905 > 192.168.100.1.8080: Flags [none], cksum 0xf547 (correct), seq 760929856, win 512, length 0
+    192.168.100.2.2905 > 192.168.100.1.8080: Flags [none], cksum 0xf547 (correct), seq 760929856, [ack 2028584922 != 0 while ACK flag not set], win 512, length 0
index 64945d98f76b1fe5b3654c3e4c52eb3c18fafea7..b87b2af8e979b733fdb5f248d71b72a6309b0391 100644 (file)
@@ -1,3 +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
+    19.128.128.20.323 > 76.19.6.127.49600: Flags [e], seq 2684354563:2684354585, [ack 3892371968 != 0 while ACK flag not set], win 28672, [urg 770 != 0 while URG flag not set], length 22
        RPKI-RTRv171 (unknown)