]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
When we get an invalid length for a DHCP option, try and continue anyway.
authorRoy Marples <roy@marples.name>
Sun, 4 Mar 2007 15:08:21 +0000 (15:08 +0000)
committerRoy Marples <roy@marples.name>
Sun, 4 Mar 2007 15:08:21 +0000 (15:08 +0000)
ChangeLog
dhcp.c

index 38a645e24e84ed7c2947ded8d014532da57ba20a..46da53184fae24e96ab311b1125f8e1353a461f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+When we get an invalid length for a DHCP option, try and continue anyway.
+
 dhcpcd-3.0.16
 RFC 2131 is full of confusion regarding MTU it seems as the effective minimum
 MTU is really 576 or DHCP requests stop working.
diff --git a/dhcp.c b/dhcp.c
index 72b69deb46c89420936daf47d27441a00e87beae..95ec84b72113f0fdee998442d80c0e23cb5f44fb 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -519,8 +519,8 @@ int parse_dhcpmessage (dhcp_t *dhcp, const dhcpmessage_t *message)
 #define LEN_ERR \
     { \
       logger (LOG_ERR, "invalid length %d for option %d", length, option); \
-      retval = -1; \
-      goto eexit; \
+      p += length; \
+      continue; \
     }
 
   while (p < end)