]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix variable length encodings
authorRoy Marples <roy@marples.name>
Wed, 14 Nov 2012 10:13:37 +0000 (10:13 +0000)
committerRoy Marples <roy@marples.name>
Wed, 14 Nov 2012 10:13:37 +0000 (10:13 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 9943e0428d6f9648344a60a4743140c8fb00ff44..acc2b54c5b1fb37c3eee2d8f462ac43cee2c0405 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -270,7 +270,7 @@ validate_length(uint8_t option, int dl, int *type)
 
                if (opt->type == 0 ||
                    opt->type & (STRING | RFC3442 | RFC5969))
-                       return 0;
+                       return dl;
 
                if (opt->type & IPV4 && opt->type & ARRAY)
                        return (dl % sizeof(uint32_t) == 0 ? 0 : -1);