diff packages/net/common/current/src/bootp_support.c @ 1632:a5c7a6799462

+ * src/bootp_support.c (get_bootp_option, show_bootp): + * src/dhcp_prot.c (scan_dhcp_size): Fixed bug that didn't handle + the pad option.
author asl
date Thu, 13 May 2004 10:00:35 +0000
parents 3d8f3b1724be
children
line wrap: on
line diff
--- a/packages/net/common/current/src/bootp_support.c
+++ b/packages/net/common/current/src/bootp_support.c
@@ -298,6 +298,9 @@ show_bootp(const char *intf, struct boot
         op = &bp->bp_vend[4];
         while (*op != TAG_END) {
             switch (*op) {
+            case TAG_PAD:
+                op++;
+                continue;
             case TAG_SUBNET_MASK:
             case TAG_GATEWAY:
             case TAG_IP_BROADCAST:
@@ -410,7 +413,11 @@ get_bootp_option(struct bootp *bp, unsig
             *length=max;                        \
             return true;                        \
         }                                       \
-        op += *(op+1)+2;                        \
+        if (*op == TAG_PAD) {                   \
+            op++;                               \
+        } else {                                \
+            op += *(op+1)+2;                    \
+        }                                       \
     }                                           \
 CYG_MACRO_END