]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf.c
Add some additional bounds checking.
[tcpdump] / print-ospf.c
index baf42f609dc5eaa7b858dbba23f8b82e9b1c8ca2..874bf5a23cd9644d860355170f8fc37fcbc5ffb9 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.54 2004-09-20 14:36:16 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56 2004-09-29 16:49:31 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -51,6 +51,7 @@ static struct tok ospf_option_values[] = {
        { OSPF_OPTION_EA,       "Advertise External" },
        { OSPF_OPTION_DC,       "Demand Circuit" },
        { OSPF_OPTION_O,        "Opaque" },
+       { OSPF_OPTION_DN,       "Up/Down" },
        { 0,                    NULL }
 };
 
@@ -893,10 +894,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;