diff --git a/net/isc-dhcp/Makefile b/net/isc-dhcp/Makefile index 2c6dd442b..e13c8c8a0 100644 --- a/net/isc-dhcp/Makefile +++ b/net/isc-dhcp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=isc-dhcp UPSTREAM_NAME:=dhcp PKG_VERSION:=4.4.3 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 069cb8b6b..7eb3dc3af 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -364,7 +364,9 @@ gen_dhcp_subnet() { echo " default-lease-time $leasetime;" echo " max-lease-time $leasetime;" fi - echo " option routers $gateway;" + if [ "$defaultroute" -eq 1 ] ; then + echo " option routers $gateway;" + fi echo " option domain-name-servers $DNS;" config_list_foreach "$cfg" "routes" append_routes config_list_foreach "$cfg" "dhcp_option" append_dhcp_options @@ -374,7 +376,7 @@ gen_dhcp_subnet() { dhcpd_add() { local cfg="$1" synthesize="$2" local dhcp6range="::" - local dynamicdhcp end gateway ifname ignore leasetime limit net netmask + local dynamicdhcp defaultroute end gateway ifname ignore leasetime limit net netmask local proto networkid start subnet local IP NETMASK BROADCAST NETWORK PREFIX DNS START END @@ -404,6 +406,8 @@ dhcpd_add() { config_get_bool dynamicdhcp "$cfg" "dynamicdhcp" 1 + config_get_bool defaultroute "$cfg" "default_route" 1 + dhcp_ifs="$dhcp_ifs $ifname" eval "$(ipcalc.sh $subnet $start $limit)" @@ -512,8 +516,8 @@ update-optimization off; include "$session_key_file"; zone $domain. { - primary 127.0.0.1; - key $session_key_name; + primary 127.0.0.1; + key $session_key_name; } EOF @@ -522,8 +526,8 @@ EOF mynet="$(rev_str "$mynet" ".")" cat <