summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-11-14 10:13:37 +0000
committerRoy Marples <roy@marples.name>2012-11-14 10:13:37 +0000
commit02c23488e622d0d62b645d3d34fd7e568b7578c6 (patch)
tree661cab077a0ed0aef20653ff2558fd1830538486
parent4550e67ae50299f6f69457578162840c2c125d30 (diff)
downloaddhcpcd-02c23488e622d0d62b645d3d34fd7e568b7578c6.tar.xz
Fix variable length encodings
-rw-r--r--dhcp.c2
1 files changed, 1 insertions, 1 deletions
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);