]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nhrp.c
CI: Add warning exemptions for Sun C (suncc-5.15) on Solaris 10
[tcpdump] / print-nhrp.c
index 800d5c53425d18a039015ada7be3cd6ce475cab3..cb04b619d62f89110f4e64f302843ac466b22bea 100644 (file)
@@ -23,9 +23,7 @@
  * I-D draft-detienne-dmvpn-01 (expired)
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -34,7 +32,6 @@
 #include "addrtoname.h"
 #include "af.h"
 #include "ethertype.h"
-#include "interface.h"
 #include "extract.h"
 
 #define NHRP_VER_RFC2332               1
@@ -179,7 +176,7 @@ static const char *
 nhrp_mac_addr_string(netdissect_options *ndo, const u_char *addr, u_int addrlen)
 {
        if (addrlen == 6)
-               return (GET_ETHERADDR_STRING(addr));
+               return (GET_MAC48_STRING(addr));
        else
                return (GET_LINKADDR_STRING(addr, LINKADDR_OTHER, addrlen));
 }
@@ -480,5 +477,15 @@ nhrp_print_cie(netdissect_options *ndo, const u_char *data, uint16_t mand_part_l
 
 invalid:
        nd_print_invalid(ndo);
+
+       /*
+        * We get here because this CIE goes past the remaining length,
+        * of the mandatory part.  We've reported that error; we now
+        * assign the insufficiently-large remaining piece of the
+        * mandatory part to this CIE, so that this CIE finishes up
+        * the mandatory part, and the loop processing the CIEs
+        * terminates.  There cannot be any CIEs after this one.
+        */
+       cie_len += mand_part_len;
        return (cie_len);
 }