]> The Tcpdump Group git mirrors - tcpdump/commitdiff
from nicolas ferrero <[email protected]>:
authorhannes <hannes>
Wed, 12 Jan 2005 11:19:08 +0000 (11:19 +0000)
committerhannes <hannes>
Wed, 12 Jan 2005 11:19:08 +0000 (11:19 +0000)
- fix EGP boundary testing

interface.h
print-egp.c
print-ip.c

index 41d8ae10140fb38be22b9c6181a5cf2d73fb9b86..df86e184e74abd8dfcc2eb95caa7ccce62690467 100644 (file)
@@ -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 *);
index 6dd98ffcffb8160836b4839d9a9f203a6607bb5f..46c276c7b7df947e05d9ea25173113711229f090 100644 (file)
@@ -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;
        }
index 6f71dae75cfef359353c62381ab5806c45ba75a2..f2d91094f9c2f4ddc78f48d8059a64d229f6ab28 100644 (file)
@@ -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: