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)
Tero Jänkä 2017-04-27 20:34:43 +03:00 committed by Hans Dedecker
parent 986d9deb3b
commit 82a4b8dd6a
2 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2017-10-19 PKG_SOURCE_DATE:=2017-10-31
PKG_SOURCE_VERSION:=0f96606b7040b8e14190ff055d5761744bc15f6d PKG_SOURCE_VERSION:=0f96606b7040b8e14190ff055d5761744bc15f6d
PKG_MIRROR_HASH:=9dcfc837b519d021bd2d51acf61c610df0a7e58f9a87d46472fbe0960d3d5dff PKG_MIRROR_HASH:=9dcfc837b519d021bd2d51acf61c610df0a7e58f9a87d46472fbe0960d3d5dff
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@ -18,10 +18,12 @@ setup_interface () {
proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}" proto_add_ipv4_address "$ip" "${subnet:-255.255.255.0}"
# TODO: apply $broadcast # TODO: apply $broadcast
local i
for i in $router; do for i in $router; do
proto_add_ipv4_route "$i" 32 "" "$ip" proto_add_ipv4_route "$i" 32 "" "$ip"
proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"
local r
for r in $CUSTOMROUTES; do for r in $CUSTOMROUTES; do
proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip" proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip"
done done
@ -31,11 +33,11 @@ setup_interface () {
[ -n "$staticroutes" ] && set_classless_routes $staticroutes [ -n "$staticroutes" ] && set_classless_routes $staticroutes
[ -n "$msstaticroutes" ] && set_classless_routes $msstaticroutes [ -n "$msstaticroutes" ] && set_classless_routes $msstaticroutes
for dns in $dns; do for i in $dns; do
proto_add_dns_server "$dns" proto_add_dns_server "$i"
done done
for domain in $domain; do for i in $domain; do
proto_add_dns_search "$domain" proto_add_dns_search "$i"
done done
proto_add_data proto_add_data