]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix variable length encodings
authorRoy Marples <roy@marples.name>
Wed, 24 Oct 2012 12:01:03 +0000 (12:01 +0000)
committerRoy Marples <roy@marples.name>
Wed, 24 Oct 2012 12:01:03 +0000 (12:01 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index ad3b3f7731f6485f0ccf6e1e41b752b79a24abb5..25431ff62fd307339c051e145e78ccdc8dc8c204 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -232,7 +232,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);