diff options
author | Steven Barth <steven@midlink.org> | 2013-11-27 14:52:31 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-11-27 14:52:31 +0100 |
commit | 5e43781680f9f55e0ae7c1b681465d64882e3b8c (patch) | |
tree | 334324e04d2b4f308690aebdfc68dcae7f3be531 /scripts | |
parent | 199723ed921160c029a0d15fa95914ddfcdc5cb9 (diff) |
IPv6: add class support to regular IPv6 addresses
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/netifd-proto.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh index 9f062d8..7f08b1d 100644 --- a/scripts/netifd-proto.sh +++ b/scripts/netifd-proto.sh @@ -106,8 +106,9 @@ proto_add_ipv6_address() { local preferred="$3" local valid="$4" local offlink="$5" + local class="$6" - append PROTO_IP6ADDR "$address/$mask/$preferred/$valid/$offlink" + append PROTO_IP6ADDR "$address/$mask/$preferred/$valid/$offlink/$class" } proto_add_ipv4_route() { @@ -175,6 +176,8 @@ _proto_push_ipv6_addr() { valid="${str%%/*}" str="${str#*/}" offlink="${str%%/*}" + str="${str#*/}" + class="${str%%/*}" json_add_object "" json_add_string ipaddr "$address" @@ -182,6 +185,7 @@ _proto_push_ipv6_addr() { [ -n "$preferred" ] && json_add_int preferred "$preferred" [ -n "$valid" ] && json_add_int valid "$valid" [ -n "$offlink" ] && json_add_boolean offlink "$offlink" + [ -n "$class" ] && json_add_string class "$class" json_close_object } |