[OpenWrt-Devel] [PATCH] netifd: Set source IP for DHCP default route

Kristian Evensen kristian.evensen at gmail.com
Fri Dec 5 04:48:22 EST 2014


From: Kristian Evensen <kristian.evensen at gmail.com>

This patch depends on "Pass source address to proto_add_ipv4_route".

I have not found a scenario that would break by setting the source address on
default, but please let me know if any special considerations should be taken.

Signed-off-by: Kristian Evensen <kristian.evensen at gmail.com>
---
 package/network/config/netifd/files/lib/netifd/dhcp.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 90fa6d3..17e22af 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -20,7 +20,7 @@ setup_interface () {
 	# TODO: apply $broadcast
 
 	for i in $router; do
-		proto_add_ipv4_route 0.0.0.0 0 "$i"
+		proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"
 	done
 
 	# CIDR STATIC ROUTES (rfc3442)
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list