summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-11-14 10:14:28 +0000
committerRoy Marples <roy@marples.name>2012-11-14 10:14:28 +0000
commit72e662d79dce18d44c17999b0a8c6a4abc5b0153 (patch)
treebf2725c9027138a56717ed27a7cea15706cb6410
parente1865b4e14c8d53a89efb1a0883e7bd73d16a8c4 (diff)
downloaddhcpcd-72e662d79dce18d44c17999b0a8c6a4abc5b0153.tar.xz
Fix stupid length validation check.
-rw-r--r--dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcp.c b/dhcp.c
index 660d31d1..640dd214 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -288,7 +288,7 @@ validate_length(uint8_t option, int dl, int *type)
/* If we don't know the size, assume it's valid */
if (sz == 0)
return dl;
- return (sz < dl ? -1 : sz);
+ return (dl < sz ? -1 : sz);
}
/* unknown option, so let it pass */