summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-06-11 13:25:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-06-11 13:25:58 +0000
commiteb9b3bdb4fa10752ecaa3e667c0ff6c7b312a6ca (patch)
tree8975505b2f1902b4babc4581fa53dcf30e2778e1
parent7cb42738e6d60df76ca64ee3d569e28454521c97 (diff)
downloadmtk-20170518-eb9b3bdb4fa10752ecaa3e667c0ff6c7b312a6ca.zip
mtk-20170518-eb9b3bdb4fa10752ecaa3e667c0ff6c7b312a6ca.tar.gz
mtk-20170518-eb9b3bdb4fa10752ecaa3e667c0ff6c7b312a6ca.tar.bz2
netifd: localize internally used shell variables (#11567)
SVN-Revision: 32192
-rwxr-xr-xpackage/netifd/files/lib/netifd/proto/dhcp.sh1
-rwxr-xr-xpackage/netifd/files/lib/network/config.sh3
2 files changed, 3 insertions, 1 deletions
diff --git a/package/netifd/files/lib/netifd/proto/dhcp.sh b/package/netifd/files/lib/netifd/proto/dhcp.sh
index 70cfc86..3365cb7 100755
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
@@ -18,6 +18,7 @@ proto_dhcp_setup() {
local config="$1"
local iface="$2"
+ local ipaddr hostname clientid vendorid broadcast reqopts
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts
local opt dhcpopts
diff --git a/package/netifd/files/lib/network/config.sh b/package/netifd/files/lib/network/config.sh
index 3b3ae93..9128971 100755
--- a/package/netifd/files/lib/network/config.sh
+++ b/package/netifd/files/lib/network/config.sh
@@ -5,6 +5,7 @@
find_config() {
local device="$1"
+ local ifdev ifl3dev ifobj
for ifobj in `ubus list network.interface.\*`; do
interface="${ifobj##network.interface.}"
(
@@ -36,7 +37,7 @@ ubus_call() {
fixup_interface() {
local config="$1"
- local ifname type
+ local ifname type device l3dev
config_get type "$config" type
config_get ifname "$config" ifname