From ad0c9114e00a9a30168e0c13c17d8f65571aa67f Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 10 Feb 2017 07:22:12 +0000 Subject: Merge r309649, r313048, r313083, r313104: tcpdump 4.9.0 --- contrib/tcpdump/print-chdlc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'contrib/tcpdump/print-chdlc.c') diff --git a/contrib/tcpdump/print-chdlc.c b/contrib/tcpdump/print-chdlc.c index 3951ef7..450d286 100644 --- a/contrib/tcpdump/print-chdlc.c +++ b/contrib/tcpdump/print-chdlc.c @@ -19,14 +19,15 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define NETDISSECT_REWORKED +/* \summary: Cisco HDLC printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" #include "ethertype.h" #include "extract.h" @@ -96,9 +97,9 @@ chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length) if (*(p+1) == 0x81 || *(p+1) == 0x82 || *(p+1) == 0x83) - isoclns_print(ndo, p + 1, length - 1, length - 1); + isoclns_print(ndo, p + 1, length - 1, ndo->ndo_snapend - p - 1); else - isoclns_print(ndo, p, length, length); + isoclns_print(ndo, p, length, ndo->ndo_snapend - p); break; default: if (!ndo->ndo_eflag) -- cgit v1.1