From: Roy Marples Date: Wed, 14 Nov 2012 10:13:37 +0000 (+0000) Subject: Fix variable length encodings X-Git-Tag: v5.6.3~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02c23488e622d0d62b645d3d34fd7e568b7578c6;p=thirdparty%2Fdhcpcd.git Fix variable length encodings --- diff --git a/dhcp.c b/dhcp.c index 9943e042..acc2b54c 100644 --- 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);