]> The Tcpdump Group git mirrors - tcpdump/commitdiff
bugfix rom Carles Kishimoto <[email protected]>:
authorhannes <hannes>
Mon, 26 Feb 2007 07:23:02 +0000 (07:23 +0000)
committerhannes <hannes>
Mon, 26 Feb 2007 07:23:02 +0000 (07:23 +0000)
the GMPLS label rquest object (c-type 4) is 4 octets (and not 8) in size.

print-rsvp.c

index ad949afb9844c2abf7b7087b7ae47cec26376aad..9e138cac81034f57649915042d151dea71fca19f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2005 The TCPDUMP project
+ * Copyright (c) 1998-2007 The TCPDUMP project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that: (1) source code
@@ -17,7 +17,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.44 2007-02-25 22:06:12 hannes Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.45 2007-02-26 07:23:02 hannes Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -907,7 +907,7 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
                 obj_tptr+=12;
                 break;
             case RSVP_CTYPE_4:
-                if (obj_tlen < 8)
+                if (obj_tlen < 4)
                     return-1;
                 printf("%s  LSP Encoding Type: %s (%u)",
                        ident,
@@ -925,8 +925,8 @@ rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
                                "Unknown",
                                EXTRACT_16BITS(obj_tptr+2)),
                       EXTRACT_16BITS(obj_tptr+2));
-                obj_tlen-=8;
-                obj_tptr+=8;
+                obj_tlen-=4;
+                obj_tptr+=4;
                 break;
             default:
                 hexdump=TRUE;