Fix breakage of dhcp_lease_time utility.

This commit is contained in:
Simon Kelley committed 2019-08-14 21:52:50 +01:00
1 parent ab73a746a0
commit 225accd235
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -39,6 +39,10 @@ version 2.81
have an interface on the network in that subnet. Many thanks to have an interface on the network in that subnet. Many thanks to
kamp.de for sponsoring this feature. kamp.de for sponsoring this feature.
Fix broken contrib/lease_tools/dhcp_lease_time.c. A packet
validation check got borked in commit 2b38e382 and release 2.80.
Thanks to Tomasz Szajner for spotting this.
version 2.80 version 2.80
Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method Add support for RFC 4039 DHCP rapid commit. Thanks to Ashram Method
+1 -1
View File
@@ -83,7 +83,7 @@ static unsigned char *option_find1(unsigned char *p, unsigned char *end, int opt
if (p >= end - 2) if (p >= end - 2)
return NULL; /* malformed packet */ return NULL; /* malformed packet */
opt_len = option_len(p); opt_len = option_len(p);
if (end - p >= (2 + opt_len)) if (end - p < (2 + opt_len))
return NULL; /* malformed packet */ return NULL; /* malformed packet */
if (*p == opt && opt_len >= minsize) if (*p == opt && opt_len >= minsize)
return p; return p;