changeset 74:5d21af7476c7 draft

When we get an invalid length for a DHCP option, try and continue anyway.
author Roy Marples <roy@marples.name>
date Sun, 04 Mar 2007 15:08:21 +0000
parents 6e7ab19c2475
children cb3acf4f0411
files ChangeLog dhcp.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 02 12:11:46 2007 +0000
+++ b/ChangeLog	Sun Mar 04 15:08:21 2007 +0000
@@ -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.
--- a/dhcp.c	Fri Mar 02 12:11:46 2007 +0000
+++ b/dhcp.c	Sun Mar 04 15:08:21 2007 +0000
@@ -519,8 +519,8 @@
 #define LEN_ERR \
     { \
       logger (LOG_ERR, "invalid length %d for option %d", length, option); \
-      retval = -1; \
-      goto eexit; \
+      p += length; \
+      continue; \
     }
 
   while (p < end)