From: Guy Harris Date: Tue, 28 Feb 2012 23:45:48 +0000 (-0800) Subject: Print a space after the options if there are any options. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/98fddc3bb425b51e164d187b459c0514ac6f8a9a Print a space after the options if there are any options. --- diff --git a/print-ip6opts.c b/print-ip6opts.c index 31eb5219..2121b460 100644 --- a/print-ip6opts.c +++ b/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; @@ -275,6 +277,7 @@ ip6_opt_print(const u_char *bp, int len) break; } } + printf(" "); #if 0 end: