]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add more nd_print_trunc() calls
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 1 Jun 2018 13:56:06 +0000 (15:56 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 1 Jun 2018 14:20:56 +0000 (16:20 +0200)
Update the output of some tests accordingly.

Moreover:
Add a ndo_protocol assignment in pimv2_print().

print-pim.c
tests/heapoverflow-in_checksum.out
tests/hoobr_pimv1.out
tests/pim_header_asan-2.out
tests/pim_header_asan-3.out
tests/pim_header_asan-4.out
tests/pim_header_asan.out
tests/pimv2-oobr-1.out
tests/pimv2-oobr-3.out

index b3e9f90ad04ac4b9b9c0ce09b36b73342f62ba1c..a8e0be019ad1fb6c99080752b26ebde5fcf8ad86 100644 (file)
@@ -244,7 +244,7 @@ pimv1_join_prune_print(netdissect_options *ndo,
        }
        return;
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -333,7 +333,7 @@ pimv1_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -452,7 +452,7 @@ cisco_autorp_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|autorp]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -495,7 +495,7 @@ pim_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -708,6 +708,7 @@ pimv2_print(netdissect_options *ndo,
        u_int pim_typever;
        u_int pimv2_addr_len;
 
+       ndo->ndo_protocol = "pimv2";
        if (len < 2)
                goto trunc;
        ND_TCHECK_1(pim->pim_rsv);
@@ -1198,5 +1199,5 @@ pimv2_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
 }
index aa59acb0ccd5136da33364cf7818853af9991841..6604956c634b7ec55526835e895914b1855da5c6 100644 (file)
@@ -1,4 +1,4 @@
 IP (tos 0x30, ttl 48, id 12336, offset 0, flags [DF], proto PIM (103), length 12336, bad cksum 3030 (->2947)!)
     48.48.48.48 > 48.48.48.48: PIMv2, length 12316
        Hello, RFC2117-encoding, cksum 0x3030 (unverified)
-         Unknown Option (12336), length 12336, Value: [|pim]
+         Unknown Option (12336), length 12336, Value:  [|pimv2]
index d54b0e1b93a2f3ab65618d8d4d126361be3205fa..343ada5cb61c6da2258b5c221f40da808ea96642 100644 (file)
@@ -22,4 +22,4 @@
 30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 262144: 
        0x0000:  3030 3030 3030 3030 3030 3030 3030 3030  0000000000000000
        0x0010:  3030 3030 3030 3030                      00000000
-IP 48.48.48.48 > 48.48.48.48: igmp pimv1 [type 48][|pim]
+IP 48.48.48.48 > 48.48.48.48: igmp pimv1 [type 48] [|pimv1]
index 75f784536cedd71a1b8353a63fdf5ea03df3898c..d68ca81fbebd5237ea36c95e1d95e575af5ba057 100644 (file)
@@ -1,5 +1,5 @@
 IP6 (class 0x76, flowlabel 0xf6767, hlim 109, next-header PIM (103) payload length: 13927) 6767:ff:ffff:ff67:6767:6778:6767:6767 > 6700:7f:e664:24:2424:2424:2424:25eb: PIMv2, length 13927
        Register, RFC2117-encoding, cksum 0x4e23 (unverified), Flags [ none ]
-       [|pim]
+        [|pimv2]
 [Invalid header: caplen==0]
 [Invalid header: len==0]
index 1dc67e24a3b3a7bc5a154f0705e3392c38683da4..4695acd53ec0a94477bad326d87dda68c629d844 100644 (file)
@@ -1,4 +1,4 @@
 IP (tos 0x0, ttl 47, id 40445, offset 0, flags [+, DF, rsvd], proto PIM (103), length 8744, bad cksum a (->9c6e)!)
     22.3.2.7 > 54.0.0.249: PIMv2, length 8724
        Register, RFC2117-encoding, cksum 0x0e00 (unverified), Flags [ none ]
-       [|pim]
+        [|pimv2]
index 78c60648c7545e8f041de6b4b23fbe0af273bb48..7ae1ed1bf6cc4dbc9efe970723d26f45fb9508c8 100644 (file)
@@ -1,6 +1,6 @@
 IP6 (class 0x76, flowlabel 0xf6767, hlim 103, next-header PIM (103) payload length: 30209) 6767:6767::1:ff:ff00 > 4501:5:1400::1300:33ed:1ee: PIMv2, length 30209
        Register, cksum 0x000f (unverified), Flags [ none ]
-       [|pim]
+        [|pimv2]
 7e:c0:c1:c0:a0:ff > 00:0c:fb:4d:20:96, ethertype Unknown (0x7f08), length 262144: 
        0x0000:  0000                                     ..
 04:01:0b:00:00:d7 > 00:00:00:00:00:00, ethertype Unknown (0xffff), length 262144: 
index 397fe1e1b6fe2ae4fb0ffc05f45e86040afa0521..cbc76f3395711a98c3e5205129d88ee57480e753 100644 (file)
@@ -1,2 +1,2 @@
 IP6 (class 0x76, flowlabel 0xf6767, hlim 109, next-header PIM (103) payload length: 30311) 6767:6767:6767:8267:6767:6765:6767:6767 > 6700:80:74:24:2424:2424:2424:2509: PIMv2, length 30311
-       Bootstrap, RFC2117-encoding[|pim]
+       Bootstrap, RFC2117-encoding [|pimv2]
index 6627e9cbef9304da7e2ac42f1d50d2b304aa8eae..8540fecd94182878dfd8b1a76f1b98e8cd305a78 100644 (file)
@@ -16374,4 +16374,4 @@ c2:02:3d:80:00:01 > 01:00:5e:00:00:0d, ethertype IPv4 (0x0800), length 65535: (t
          Unknown Option (0), length 0, Value: 
          Generation ID Option (20), length 0, Value: ERROR: Option Length != 4 Bytes (0)
          Unknown Option (0), length 0, Value: 
-         Generation ID Option (20), length 0, Value: ERROR: Option Length != 4 Bytes (0)[|pim]
+         Generation ID Option (20), length 0, Value: ERROR: Option Length != 4 Bytes (0) [|pimv2]
index 6ea4ec3d26867796ce8fe3bd31f5671fa90a74e5..5b55035ee133a884803815491a7255df3aaea6bb 100644 (file)
@@ -7671,4 +7671,4 @@ c2:02:52:72:00:00 > 01:00:5e:00:00:0d, ethertype IPv4 (0x0800), length 65535: (t
          DR Priority Option (19), length 4, Value: 1
            0x0000:  0000 0001
          State Refresh Capability Option (21), length 2, Value: ERROR: Option Length != 4 Bytes (2)
-           0x0000:  0069[|pim]
+           0x0000:  0069 [|pimv2]