]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
add boundary, infinite loop checks
[tcpdump] / print-ospf.c
index be622868b40d4e9e9921a78471c61c906cf21866..6fd33b28088662798d1bfb1e59eb252d53a8429c 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.55 2004-09-20 14:56:34 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.57 2005-04-20 21:55:14 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -873,15 +873,13 @@ trunc:
 
 void
 ospf_print(register const u_char *bp, register u_int length,
-    register const u_char *bp2)
+    const u_char *bp2 _U_)
 {
        register const struct ospfhdr *op;
-       register const struct ip *ip;
        register const u_char *dataend;
        register const char *cp;
 
        op = (struct ospfhdr *)bp;
-       ip = (struct ip *)bp2;
 
         /* XXX Before we do anything else, strip off the MD5 trailer */
         TCHECK(op->ospf_authtype);
@@ -894,10 +892,9 @@ ospf_print(register const u_char *bp, register u_int length,
        /* value.  If it's not valid, say so and return */
        TCHECK(op->ospf_type);
        cp = tok2str(type2str, "unknown LS-type", op->ospf_type);
-       printf("OSPFv%u, %s (%u), length: %u",
+       printf("OSPFv%u, %s, length: %u",
               op->ospf_version,
               cp,
-              op->ospf_type,
               length);
        if (*cp == 'u')
                return;