X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5c13f551fa9b08396f4b385c6b16447f718a518b..refs/heads/master:/print-nhrp.c diff --git a/print-nhrp.c b/print-nhrp.c index 800d5c53..cb04b619 100644 --- a/print-nhrp.c +++ b/print-nhrp.c @@ -23,9 +23,7 @@ * I-D draft-detienne-dmvpn-01 (expired) */ -#ifdef HAVE_CONFIG_H #include -#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); }