summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-03-19 18:28:30 +0100
committerSteven Barth <steven@midlink.org>2015-03-19 18:28:30 +0100
commitd90be1fc63ca18cb348069e9b10181ccb57baa6e (patch)
treed1fa708aab2a4df2249d419d0a63875b4db462f9 /scripts
parent3eea8576d48d9b20cc1c6b46f54c7345a39d13aa (diff)
downloadnetifd-d90be1fc63ca18cb348069e9b10181ccb57baa6e.tar.gz
Add table argument to shell API for routes
Signed-off-by: Steven Barth <steven@midlink.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/netifd-proto.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh
index b5ef3d1..b3d5bb5 100644
--- a/scripts/netifd-proto.sh
+++ b/scripts/netifd-proto.sh
@@ -132,8 +132,9 @@ proto_add_ipv6_route() {
local metric="$4"
local valid="$5"
local source="$6"
+ local table="$7"
- append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$source"
+ append PROTO_ROUTE6 "$target/$mask/$gw/$metric/$valid/$source/$table"
}
proto_add_ipv6_prefix() {
@@ -211,7 +212,9 @@ _proto_push_route() {
str="${str#*/}"
local valid="${str%%/*}"
str="${str#*/}"
- local source="${str}"
+ local source="${str%%/*}"
+ str="${str#*/}"
+ local table="${str}"
json_add_object ""
json_add_string target "$target"
@@ -220,6 +223,7 @@ _proto_push_route() {
[ -n "$metric" ] && json_add_int metric "$metric"
[ -n "$valid" ] && json_add_int valid "$valid"
[ -n "$source" ] && json_add_string source "$source"
+ [ -n "$table" ] && json_add_string table "$table"
json_close_object
}