summaryrefslogtreecommitdiffhomepage
path: root/dummy/netifd-proto.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-06-18 23:22:55 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-06-18 23:24:56 +0200
commite22d6c5ce7b579a3af3a5da7d692aaf952a8f651 (patch)
tree3b071bcfbdc95474e1ad8560a3dca09f47b25de1 /dummy/netifd-proto.sh
parent88ae5a835d1c3184410f3023fc637d02bd58611e (diff)
netifd-proto.sh: execute proto_add_host_dependency() actions in subshell to retain callers environment
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-xdummy/netifd-proto.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh
index 365c433..297e904 100755
--- a/dummy/netifd-proto.sh
+++ b/dummy/netifd-proto.sh
@@ -290,10 +290,14 @@ proto_add_host_dependency() {
local interface="$1"
local host="$2"
- json_init
- json_add_int action 6
- json_add_string host "$host"
- _proto_notify "$interface" -S
+ # execute in subshell to not taint callers env
+ # see tickets #11046, #11545, #11570
+ (
+ json_init
+ json_add_int action 6
+ json_add_string host "$host"
+ _proto_notify "$interface" -S
+ )
}
proto_setup_failed() {