]> The Tcpdump Group git mirrors - tcpdump/commitdiff
removing unnecessary processing for zero length options
authorhannes <hannes>
Tue, 22 Apr 2008 09:45:08 +0000 (09:45 +0000)
committerhannes <hannes>
Tue, 22 Apr 2008 09:45:08 +0000 (09:45 +0000)
print-bootp.c

index b442c18388a75e479102eee426a0e1d1baa566c3..c7538ff8714029e19d4365f02a5f42ee30edc87a 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.88 2007-09-20 15:04:45 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.89 2008-04-22 09:45:08 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -585,8 +585,6 @@ rfc1048_print(register const u_char *bp)
                                if (len < 1)  {
                                        printf("ERROR: option %u len %u < 1 bytes",
                                            TAG_NETBIOS_NODE, len);
-                                       bp += len;
-                                       len = 0;
                                        break;
                                }
                                tag = *bp++;
@@ -599,8 +597,6 @@ rfc1048_print(register const u_char *bp)
                                if (len < 1)  {
                                        printf("ERROR: option %u len %u < 1 bytes",
                                            TAG_OPT_OVERLOAD, len);
-                                       bp += len;
-                                       len = 0;
                                        break;
                                }
                                tag = *bp++;
@@ -640,8 +636,6 @@ rfc1048_print(register const u_char *bp)
                                if (len < 1)  {
                                        printf("ERROR: option %u len %u < 1 bytes",
                                            TAG_CLIENT_ID, len);
-                                       bp += len;
-                                       len = 0;
                                        break;
                                }
                                type = *bp++;