From: hannes Date: Wed, 12 Jan 2005 11:19:08 +0000 (+0000) Subject: from nicolas ferrero : X-Git-Tag: tcpdump-3.9.1~212 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/b7370aa82b9f436f5b15ae39ec64423e0b152d62 from nicolas ferrero : - fix EGP boundary testing --- diff --git a/interface.h b/interface.h index 41d8ae10..df86e184 100644 --- a/interface.h +++ b/interface.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.239 2004-12-30 03:36:50 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.240 2005-01-12 11:19:08 hannes Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -185,7 +185,7 @@ extern void cnfp_print(const u_char *, const u_char *); extern void decnet_print(const u_char *, u_int, u_int); extern void default_print(const u_char *, u_int); extern void dvmrp_print(const u_char *, u_int); -extern void egp_print(const u_char *); +extern void egp_print(const u_char *, u_int); extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *); diff --git a/print-egp.c b/print-egp.c index 6dd98ffc..46c276c7 100644 --- a/print-egp.c +++ b/print-egp.c @@ -20,7 +20,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.36 2003-11-16 09:36:20 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.37 2005-01-12 11:19:09 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -214,7 +214,7 @@ trunc: } void -egp_print(register const u_int8_t *bp) +egp_print(register const u_int8_t *bp, register u_int length) { register const struct egp_packet *egp; register int status; @@ -222,7 +222,7 @@ egp_print(register const u_int8_t *bp) register int type; egp = (struct egp_packet *)bp; - if (!TTEST(*egp)) { + if (!TTEST2(*egp, length)) { printf("[|egp]"); return; } diff --git a/print-ip.c b/print-ip.c index 6f71dae7..f2d91094 100644 --- a/print-ip.c +++ b/print-ip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.145 2004-12-27 22:30:54 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.146 2005-01-12 11:19:08 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -558,7 +558,7 @@ again: break; case IPPROTO_EGP: - egp_print(cp); + egp_print(cp, len); break; case IPPROTO_OSPF: