aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-12-12 09:39:07 +0000
committerSteven Barth <steven@midlink.org>2014-12-12 09:39:07 +0000
commite24e54dce44b61fb88a1a1badcfb5bd4c3cbc506 (patch)
treeedb11d8c5006690bd23c437b14f4ff350d951387 /package/network/config
parent75eeacb86369d7a92d045ac76757d0631a1226db (diff)
downloadupstream-e24e54dce44b61fb88a1a1badcfb5bd4c3cbc506.tar.gz
upstream-e24e54dce44b61fb88a1a1badcfb5bd4c3cbc506.tar.bz2
upstream-e24e54dce44b61fb88a1a1badcfb5bd4c3cbc506.zip
netifd: Set source IP for DHCP static routes as well
Commit ce92f6650bd8a86db04c7a6cbb58e7fdb200a7e6 added source IP support for DHCP default routes. As a side effect of this change the default route could be present twice in netifd (once with source IP set and once with source IP unset) if it was sent by the server in both the router and static route options. Therefore add source IP support as well for static routes as this case was not considered. Additional remove unused parameter type. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43645 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/config')
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/dhcp.script3
1 files changed, 1 insertions, 2 deletions
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 17e22af795..54d3aa1072 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -6,9 +6,8 @@
set_classless_routes() {
local max=128
- local type
while [ -n "$1" -a -n "$2" -a $max -gt 0 ]; do
- proto_add_ipv4_route "${1%%/*}" "${1##*/}" "$2"
+ proto_add_ipv4_route "${1%%/*}" "${1##*/}" "$2" "$ip"
max=$(($max-1))
shift 2
done