diff options
author | Steven Barth <steven@midlink.org> | 2013-10-18 12:09:42 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-10-18 12:09:42 +0200 |
commit | e93c42c036c4b4df1f65f261def31cf1a429e942 (patch) | |
tree | 2d92d5d871b10c542402d9d99b354daaf839b545 /dummy/netifd-proto.sh | |
parent | ddbd2cc51b3db14f6a8bd46ceebaee9097a50b78 (diff) |
Add source-restricted routes
Diffstat (limited to 'dummy/netifd-proto.sh')
-rwxr-xr-x | dummy/netifd-proto.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dummy/netifd-proto.sh b/dummy/netifd-proto.sh index d8b540d..6f20de9 100755 --- a/dummy/netifd-proto.sh +++ b/dummy/netifd-proto.sh @@ -143,8 +143,9 @@ proto_add_ipv6_route() { local gw="$3" local metric="$4" local valid="$5" + local source="$6" - append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid" + append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$source" } proto_add_ipv6_prefix() { @@ -218,6 +219,8 @@ _proto_push_route() { local metric="${str%%/*}" str="${str#*/}" local valid="${str%%/*}" + str="${str#*/}" + local source="${str}" json_add_object "" json_add_string target "$target" @@ -225,6 +228,7 @@ _proto_push_route() { [ -n "$gw" ] && json_add_string gateway "$gw" [ -n "$metric" ] && json_add_int metric "$metric" [ -n "$valid" ] && json_add_int valid "$valid" + [ -n "$source" ] && json_add_string source "$source" json_close_object } |