summaryrefslogtreecommitdiffhomepage
path: root/dummy/netifd-proto.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-13 23:57:39 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-13 23:59:08 +0200
commit547d96cd6d1bdf3624711b08491ca7fce6b4b0a3 (patch)
tree569763eaec794193713fef8418fa9241760c52f9 /dummy/netifd-proto.sh
parent120881e1b8022a103c50ba0bf2899060d06ead70 (diff)
add proper parameters for protocol notify functions
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-xdummy/netifd-proto.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh
index ae05b9c..9fc9cab 100755
--- a/dummy/netifd-proto.sh
+++ b/dummy/netifd-proto.sh
@@ -121,6 +121,7 @@ _proto_push_array() {
}
_proto_notify() {
+ local interface="$1"
ubus call network.interface."$interface" notify_proto "$(json_dump)"
}
@@ -132,10 +133,12 @@ proto_send_update() {
_proto_push_array "route" "$PROTO_ROUTE" _proto_push_route
_proto_push_array "route6" "$PROTO_ROUTE6" _proto_push_route
_proto_push_array "dns" "$PROTO_DNS" _proto_push_ip
- _proto_notify
+ _proto_notify "$interface"
}
proto_run_command() {
+ local interface="$1"; shift
+
json_init
json_add_int action 1
json_add_array command
@@ -143,7 +146,7 @@ proto_run_command() {
json_add_string "" "$1"
shift
done
- _proto_notify
+ _proto_notify "$interface"
}
init_proto() {