aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/network/config/netifd/Makefile2
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/dhcp.script8
2 files changed, 8 insertions, 2 deletions
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 4eb4737a3a..3efcd3009e 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 24f243c2c7..00604f40e7 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -18,9 +18,15 @@ setup_interface () {
proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
# TODO: apply $broadcast
+ local ip_net
+ eval "$(ipcalc.sh "$ip/$mask")";ip_net="$NETWORK"
+
local i
for i in $router; do
- proto_add_ipv4_route "$i" 32 "" "$ip"
+ local gw_net
+ eval "$(ipcalc.sh "$i/$mask")";gw_net="$NETWORK"
+
+ [ "$ip_net" != "$gw_net" ] && proto_add_ipv4_route "$i" 32 "" "$ip"
proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"
local r