apply basic device settings for hotplug devices, e.g. mtu and txqueuelen
[project/netifd.git] / dummy / netifd-proto.sh
index a38f9d9..297e904 100755 (executable)
@@ -290,10 +290,21 @@ proto_add_host_dependency() {
        local interface="$1"
        local host="$2"
 
+       # 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() {
+       local interface="$1"
        json_init
-       json_add_int action 6
-       json_add_string host "$host"
-       _proto_notify "$interface" -S
+       json_add_int action 7
+       _proto_notify "$interface"
 }
 
 init_proto() {