]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Print a space after the options if there are any options.
authorGuy Harris <[email protected]>
Tue, 28 Feb 2012 23:45:48 +0000 (15:45 -0800)
committerGuy Harris <[email protected]>
Tue, 28 Feb 2012 23:46:20 +0000 (15:46 -0800)
print-ip6opts.c

index 31eb5219f2ff0a96dc5c0fea7e130b5aa7eecc8a..2121b46039ad02576af34d9b2aa0f1857335f657 100644 (file)
@@ -141,6 +141,8 @@ ip6_opt_print(const u_char *bp, int len)
     int i;
     int optlen = 0;
 
     int i;
     int optlen = 0;
 
+    if (len == 0)
+        return;
     for (i = 0; i < len; i += optlen) {
        if (bp[i] == IP6OPT_PAD1)
            optlen = 1;
     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;
        }
     }
            break;
        }
     }
+    printf(" ");
 
 #if 0
 end:
 
 #if 0
 end: