]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add a nd_print_trunc() call
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 10 May 2018 19:17:35 +0000 (21:17 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 10 May 2018 19:17:35 +0000 (21:17 +0200)
Update the output of a test accordingly.

Moreover:
Add a ndo_protocol reassignment after xxx_print() calls.

print-ip6.c
tests/ipv6-next-header-oobr-1.out

index 50374e089bdca135a3cc3318d4d5821c3a7bc196..4f0618a3fc728e517c8927eb12ebe10e4db865f0 100644 (file)
@@ -421,9 +421,12 @@ ip6_print(netdissect_options *ndo, const u_char *bp, u_int length)
                        ND_PRINT("ip-proto-%u %u", nh, len);
                        return;
                }
+
+               /* ndo_protocol reassignment after xxx_print() calls */
+               ndo->ndo_protocol = "ip6";
        }
 
        return;
 trunc:
-       ND_PRINT("[|ip6]");
+       nd_print_trunc(ndo);
 }
index 74eaf72c5b569f840c76762d4cf9bd00907d56d1..f46ff14628a59dc8f0e48d44d0614cd97f4996fa 100644 (file)
@@ -1 +1 @@
-IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: HBH [|ip6]
+IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: HBH  [|ip6]