aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorMark Baker <mark@vpost.net>2023-02-01 20:30:57 -0500
committerPaul Spooren <mail@aparcar.org>2023-02-24 23:56:36 +0100
commitf35e2422b8774a2a70c8c3cd87c4289b17b7d4a3 (patch)
treeea07f7a628bde30da3b699b6f1015cf6572290f1 /package
parenteaf5c85fd3d7d8f35dd80e6816c79dc35016a83f (diff)
downloadupstream-f35e2422b8774a2a70c8c3cd87c4289b17b7d4a3.tar.gz
upstream-f35e2422b8774a2a70c8c3cd87c4289b17b7d4a3.tar.bz2
upstream-f35e2422b8774a2a70c8c3cd87c4289b17b7d4a3.zip
base-files: add support for retrieving IPv6 assignments
In DHCPv6-PD enabled environments, addresses are assigned to interfaces. These new functions retrieve the IPv6 assigned prefix(es). Signed-off-by: Mark Baker <mark@vpost.net>
Diffstat (limited to 'package')
-rw-r--r--package/base-files/files/lib/functions/network.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/network.sh b/package/base-files/files/lib/functions/network.sh
index 055f18c11e..4851a5817a 100644
--- a/package/base-files/files/lib/functions/network.sh
+++ b/package/base-files/files/lib/functions/network.sh
@@ -90,6 +90,13 @@ network_get_prefix6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/"
}
+# determine first IPv6 prefix assignment of given logical interface
+# 1: destination variable
+# 2: interface
+network_get_prefix_assignment6() {
+ __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['address','mask']" "/"
+}
+
# determine all IPv4 addresses of given logical interface
# 1: destination variable
# 2: interface
@@ -187,6 +194,13 @@ network_get_prefixes6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ "
}
+# determine all IPv6 prefix assignments of given logical interface
+# 1: destination variable
+# 2: interface
+network_get_prefix_assignments6() {
+ __network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][*]['address','mask']" "/ "
+}
+
# determine IPv4 gateway of given logical interface
# 1: destination variable
# 2: interface