From: Roy Marples Date: Wed, 24 Oct 2012 12:01:03 +0000 (+0000) Subject: Fix variable length encodings X-Git-Tag: v5.99.3~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d1782ea53ab0bbcf028b3f559cc0e68217e3939;p=thirdparty%2Fdhcpcd.git Fix variable length encodings --- diff --git a/dhcp.c b/dhcp.c index ad3b3f77..25431ff6 100644 --- 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);