X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Fnetifd-proto.sh;h=64b3cab92e05e70bbbcf3b7dd51ce623327d7de8;hb=e7dbda3d64e98276570cba3b0c0f94461f77d645;hp=b3d5bb5478cb24d85dac5bad90e2eda3b6b9cec7;hpb=d90be1fc63ca18cb348069e9b10181ccb57baa6e;p=project%2Fnetifd.git diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh index b3d5bb5..64b3cab 100644 --- a/scripts/netifd-proto.sh +++ b/scripts/netifd-proto.sh @@ -121,8 +121,9 @@ proto_add_ipv4_route() { local mask="$2" local gw="$3" local source="$4" + local metric="$5" - append PROTO_ROUTE "$target/$mask/$gw///$source" + append PROTO_ROUTE "$target/$mask/$gw/$metric///$source" } proto_add_ipv6_route() { @@ -134,7 +135,7 @@ proto_add_ipv6_route() { local source="$6" local table="$7" - append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$source/$table" + append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$table/$source" } proto_add_ipv6_prefix() { @@ -212,9 +213,9 @@ _proto_push_route() { str="${str#*/}" local valid="${str%%/*}" str="${str#*/}" - local source="${str%%/*}" + local table="${str%%/*}" str="${str#*/}" - local table="${str}" + local source="${str}" json_add_object "" json_add_string target "$target" @@ -361,8 +362,10 @@ init_proto() { dump) add_protocol() { no_device=0 + no_proto_task=0 available=0 renew_handler=0 + teardown_on_l3_link_down=0 add_default_handler "proto_$1_init_config" @@ -372,8 +375,11 @@ init_proto() { eval "proto_$1_init_config" json_close_array json_add_boolean no-device "$no_device" + json_add_boolean no-proto-task "$no_proto_task" 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 } ;;