aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/netifd/files
diff options
context:
space:
mode:
authorTero Jänkä <tero.janka@gmail.com>2017-04-27 20:34:43 +0300
committerHans Dedecker <dedeckeh@gmail.com>2017-11-02 18:20:55 +0100
commit82a4b8dd6a0267c50ceb6be98422314a224eea9d (patch)
treed39a9a72a18895ff02262c7fb703f4cbca1d5384 /package/network/config/netifd/files
parent986d9deb3b24bc72e9e7ecf93affbc3f188bb926 (diff)
downloadupstream-82a4b8dd6a0267c50ceb6be98422314a224eea9d.tar.gz
upstream-82a4b8dd6a0267c50ceb6be98422314a224eea9d.tar.bz2
upstream-82a4b8dd6a0267c50ceb6be98422314a224eea9d.zip
netifd: fix dns and domain variables pollution in dhcp.script
Unmodified dns and domain variables could be needed in user script (/etc/udhcpc.user). Signed-off-by: Tero Jänkä <tero.janka@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (cleanup)
Diffstat (limited to 'package/network/config/netifd/files')
-rwxr-xr-xpackage/network/config/netifd/files/lib/netifd/dhcp.script10
1 files changed, 6 insertions, 4 deletions
diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script
index e841f91855..24f243c2c7 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -18,10 +18,12 @@ setup_interface () {
proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
# TODO: apply $broadcast
+ local i
for i in $router; do
proto_add_ipv4_route "$i" 32 "" "$ip"
proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"
+ local r
for r in $CUSTOMROUTES; do
proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip"
done
@@ -31,11 +33,11 @@ setup_interface () {
[ -n "$staticroutes" ] && set_classless_routes $staticroutes
[ -n "$msstaticroutes" ] && set_classless_routes $msstaticroutes
- for dns in $dns; do
- proto_add_dns_server "$dns"
+ for i in $dns; do
+ proto_add_dns_server "$i"
done
- for domain in $domain; do
- proto_add_dns_search "$domain"
+ for i in $domain; do
+ proto_add_dns_search "$i"
done
proto_add_data