summaryrefslogtreecommitdiffhomepage
path: root/scripts/netifd-proto.sh
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-08-11 15:53:25 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-11 19:33:47 +0200
commite7dbda3d64e98276570cba3b0c0f94461f77d645 (patch)
tree1a3a49fba4dbd003d07394f593faeb70beeddd2b /scripts/netifd-proto.sh
parent656c387974879105c2aaec6b62478d0195067f2d (diff)
proto-shell: Support teardown on layer 3 link loss
Commit c6858766 added interface teardown support on layer 3 device link loss mainly for shell protocols who have no proto task like xl2tp. However for shell protocols having a proto task it is not always the correct action to teardown the interface; as an example the PPP daemon can be put into persist state trying to re-establish the link via a hold-off mechanism if layer 3 link loss is detected. Therefore shell handlers can enable via TEARDOWN_ON_L3_LINK_DOWN a proto flag which will teardown the interface when layer 3 link loss is detected Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'scripts/netifd-proto.sh')
-rw-r--r--scripts/netifd-proto.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh
index 447f0f6..64b3cab 100644
--- a/scripts/netifd-proto.sh
+++ b/scripts/netifd-proto.sh
@@ -365,6 +365,7 @@ init_proto() {
no_proto_task=0
available=0
renew_handler=0
+ teardown_on_l3_link_down=0
add_default_handler "proto_$1_init_config"
@@ -378,6 +379,7 @@ init_proto() {
json_add_boolean available "$available"
json_add_boolean renew-handler "$renew_handler"
json_add_boolean lasterror "$lasterror"
+ json_add_boolean teardown-on-l3-link-down "$teardown_on_l3_link_down"
json_dump
}
;;