diff options
Diffstat (limited to 'contrib/tcpdump/print-ip6opts.c')
-rw-r--r-- | contrib/tcpdump/print-ip6opts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-ip6opts.c b/contrib/tcpdump/print-ip6opts.c index 7a4bf55..2121b46 100644 --- a/contrib/tcpdump/print-ip6opts.c +++ b/contrib/tcpdump/print-ip6opts.c @@ -141,6 +141,8 @@ ip6_opt_print(const u_char *bp, int len) int i; int optlen = 0; + if (len == 0) + return; for (i = 0; i < len; i += optlen) { if (bp[i] == IP6OPT_PAD1) optlen = 1; @@ -271,10 +273,11 @@ ip6_opt_print(const u_char *bp, int len) printf("(type %d: trunc)", bp[i]); goto trunc; } - printf("(opt_type 0x%02x: len=%d) ", bp[i], bp[i + 1]); + printf("(opt_type 0x%02x: len=%d)", bp[i], bp[i + 1]); break; } } + printf(" "); #if 0 end: |