Module Name: src
Committed By: christos
Date: Tue Dec 27 15:12:45 UTC 2011
Modified Files:
src/external/bsd/tcpdump/dist: print-icmp6.c
Log Message:
PR/45747: Henning Petersen: Fix icmp6 verbose printing.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/tcpdump/dist/print-icmp6.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/tcpdump/dist/print-icmp6.c
diff -u src/external/bsd/tcpdump/dist/print-icmp6.c:1.2 src/external/bsd/tcpdump/dist/print-icmp6.c:1.3
--- src/external/bsd/tcpdump/dist/print-icmp6.c:1.2 Sun Dec 5 00:11:30 2010
+++ src/external/bsd/tcpdump/dist/print-icmp6.c Tue Dec 27 10:12:45 2011
@@ -25,7 +25,7 @@
static const char rcsid[] _U_ =
"@(#) Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.86 2008-02-05 19:36:13 guy Exp";
#else
-__RCSID("$NetBSD: print-icmp6.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
+__RCSID("$NetBSD: print-icmp6.c,v 1.3 2011/12/27 15:12:45 christos Exp $");
#endif
#endif
@@ -355,15 +355,20 @@ icmp6_print(netdissect_options *ndo,
printf("ICMP6, %s", tok2str(icmp6_type_values,"unknown icmp6 type (%u)",dp->icmp6_type));
/* display cosmetics: print the packet length for printer that use the vflag now */
- if (vflag && (dp->icmp6_type ==
- ND_ROUTER_SOLICIT ||
- ND_ROUTER_ADVERT ||
- ND_NEIGHBOR_ADVERT ||
- ND_NEIGHBOR_SOLICIT ||
- ND_REDIRECT ||
- ICMP6_HADISCOV_REPLY ||
- ICMP6_MOBILEPREFIX_ADVERT ))
- printf(", length %u", length);
+ if (vflag)
+ switch (dp->icmp6_type) {
+ case ND_ROUTER_SOLICIT:
+ case ND_ROUTER_ADVERT:
+ case ND_NEIGHBOR_ADVERT:
+ case ND_NEIGHBOR_SOLICIT:
+ case ND_REDIRECT:
+ case ICMP6_HADISCOV_REPLY:
+ case ICMP6_MOBILEPREFIX_ADVERT:
+ printf(", length %u", length);
+ break;
+ default:
+ break;
+ }
switch (dp->icmp6_type) {
case ICMP6_DST_UNREACH: