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() {
local metric="${str%%/*}"
str="${str#*/}"
local valid="${str%%/*}"
+ str="${str#*/}"
+ local source="${str}"
json_add_object ""
json_add_string target "$target"
[ -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
}