summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-06-10 10:40:14 +0200
committerSteven Barth <steven@midlink.org>2014-06-10 10:47:07 +0200
commit6c93cef912cc3f9b0bd0805bd66289d72bc315e5 (patch)
treef60e4e2564099ebfbbc017a9e36c32735977366b
parent119463710f87320f2c5e6588f59b669e2d11e46e (diff)
Fix DHCP settings for /28
-rw-r--r--src/dhcpv4.c5
1 files changed, 4 insertions, 1 deletions
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);
}
}