]> The Tcpdump Group git mirrors - tcpdump/commitdiff
corrected offset check and calculation for the RP holdtime and
authoritojun <itojun>
Wed, 17 Nov 1999 14:58:13 +0000 (14:58 +0000)
committeritojun <itojun>
Wed, 17 Nov 1999 14:58:13 +0000 (14:58 +0000)
priority fields of Bootstraps.

(sync with KAME)

print-pim.c

index 10a030ebd2284b15c827b896089b31e05bb03704..7877998d2888b9b07a101bb4f1d62c7a69427592 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.11 1999-11-17 04:14:50 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.12 1999-11-17 14:58:13 itojun Exp $ (LBL)";
 #endif
 
 #include <sys/param.h>
@@ -492,17 +492,17 @@ pimv2_print(register const u_char *bp, register u_int len)
                                }
                                bp += advance;
 
-                               if (bp + 2 >= ep) {
+                               if (bp + 1 >= ep) {
                                        (void)printf("...)");
                                        goto bs_done;
                                }
                                (void)printf(",holdtime=%d",
                                             ntohs(*(u_int16_t *)bp));
-                               if (bp + 3 >= ep) {
+                               if (bp + 2 >= ep) {
                                        (void)printf("...)");
                                        goto bs_done;
                                }
-                               (void)printf(",prio=%d", bp[3]);
+                               (void)printf(",prio=%d", bp[2]);
                                bp += 4;
                        }
                        (void)printf(")");