projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proto-shell: Support teardown on layer 3 link loss
[project/netifd.git]
/
proto-shell.c
diff --git
a/proto-shell.c
b/proto-shell.c
index
25dec00
..
4391cdd
100644
(file)
--- a/
proto-shell.c
+++ b/
proto-shell.c
@@
-906,6
+906,10
@@
proto_shell_add_handler(const char *script, const char *name, json_object *obj)
if (tmp && json_object_get_boolean(tmp))
handler->proto.flags |= PROTO_FLAG_LASTERROR;
if (tmp && json_object_get_boolean(tmp))
handler->proto.flags |= PROTO_FLAG_LASTERROR;
+ tmp = json_get_field(obj, "teardown-on-l3-link-down", json_type_boolean);
+ if (tmp && json_object_get_boolean(tmp))
+ handler->proto.flags |= PROTO_FLAG_TEARDOWN_ON_L3_LINK_DOWN;
+
config = json_get_field(obj, "config", json_type_array);
if (config)
handler->config_buf = netifd_handler_parse_config(&handler->config, config);
config = json_get_field(obj, "config", json_type_array);
if (config)
handler->config_buf = netifd_handler_parse_config(&handler->config, config);