diff options
author | Steven Barth <steven@midlink.org> | 2014-06-07 12:34:48 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-06-07 12:34:48 +0200 |
commit | 4f4de590ce3bf6f44a6783559479f5055571fe44 (patch) | |
tree | 8f95d235f9eea6ed46103d25553f2ad25136542f /src/dhcpv4.c | |
parent | fc7fb637811089b4f26fb00ca81a0d05c09076bd (diff) |
Add default DHCPv4 range for prefixes down to /28
Diffstat (limited to 'src/dhcpv4.c')
-rw-r--r-- | src/dhcpv4.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 628efcd..ad14e34 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -119,16 +119,19 @@ int setup_dhcpv4_interface(struct interface *iface, bool enable) (addr.s_addr & mask.s_addr); iface->dhcpv4_end.s_addr = htonl(end) | (addr.s_addr & mask.s_addr); - } else if (ntohl(mask.s_addr) <= 0xffffffc0) { + } else if (ntohl(mask.s_addr) <= 0xfffffff0) { start = addr.s_addr & mask.s_addr; end = addr.s_addr & mask.s_addr; if (ntohl(mask.s_addr) <= 0xffffff00) { iface->dhcpv4_start.s_addr = start | htonl(100); iface->dhcpv4_end.s_addr = end | htonl(250); + } else if (ntohl(mask.s_addr) <= 0xffffffc0) { + iface->dhcpv4_start.s_addr = start | htonl(10); + iface->dhcpv4_end.s_addr = end | htonl(60); } else { iface->dhcpv4_start.s_addr = start | htonl(10); - iface->dhcpv4_end.s_addr = end | htonl(59); + iface->dhcpv4_end.s_addr = end | htonl(30); } } |