]> The Tcpdump Group git mirrors - tcpdump/commitdiff
BGP assumes octets, not bytes; no need to use NBBY, just use 8.
authorGuy Harris <[email protected]>
Sat, 3 May 2014 18:44:54 +0000 (11:44 -0700)
committerGuy Harris <[email protected]>
Sat, 3 May 2014 18:44:54 +0000 (11:44 -0700)
Everywhere else in the BGP dissector, we just use a constant 8 for the
number of bits per octet; get rid of the one place where we use NBBY.

This gets rid of the one and only place we use NBBY; get rid of our own
definition of it.

print-bgp.c
tcpdump-stdinc.h

index 74d7a560dfee090dbf18ba808cb4180d3fa99895..f5c02a1be985ae3c4d20e5ed5571db92a30a589a 100644 (file)
@@ -806,7 +806,7 @@ decode_mdt_vpn_nlri(netdissect_options *ndo,
     ND_TCHECK(pptr[0]);
 
     /* if the NLRI is not predefined length, quit.*/
-    if (*pptr != MDT_VPN_NLRI_LEN * NBBY)
+    if (*pptr != MDT_VPN_NLRI_LEN * 8)
        return -1;
     pptr++;
 
index 1fe7194f442806e2bcff6a4d249b8b2361ef4ac3..afcf803e8e0bee5e12b0639eae5a7827ecb5866c 100644 (file)
 #include <sys/types.h>
 #include <net/netdb.h>  /* in wpcap's Win32/include */
 
-#ifndef NBBY
-#define NBBY   8
-#endif
-
 #ifndef uint8_t
 #define uint8_t                unsigned char
 #endif