From 6c93cef912cc3f9b0bd0805bd66289d72bc315e5 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 10 Jun 2014 10:40:14 +0200 Subject: Fix DHCP settings for /28 --- src/dhcpv4.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/dhcpv4.c') diff --git a/src/dhcpv4.c b/src/dhcpv4.c index ad14e34..4b69467 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -129,9 +129,12 @@ int setup_dhcpv4_interface(struct interface *iface, bool enable) } else if (ntohl(mask.s_addr) <= 0xffffffc0) { iface->dhcpv4_start.s_addr = start | htonl(10); iface->dhcpv4_end.s_addr = end | htonl(60); - } else { + } else if (ntohl(mask.s_addr) <= 0xffffffe0) { iface->dhcpv4_start.s_addr = start | htonl(10); iface->dhcpv4_end.s_addr = end | htonl(30); + } else { + iface->dhcpv4_start.s_addr = start | htonl(3); + iface->dhcpv4_end.s_addr = end | htonl(12); } } -- cgit v1.2.3