summaryrefslogtreecommitdiffstats
path: root/test/test-network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-08-17 06:33:35 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-08-20 13:50:56 +0200
commit489671d2252c0923f1cb68167b90100099f947ab (patch)
tree588a3e3828e80586ed253552ea7d114c0f358610 /test/test-network
parentnetwork/queue: introduce manager_queue_request_full() (diff)
downloadsystemd-489671d2252c0923f1cb68167b90100099f947ab.tar.xz
systemd-489671d2252c0923f1cb68167b90100099f947ab.zip
network/address-label: allow to configure IPv6 address label in networkd.conf
Closes #23159.
Diffstat (limited to 'test/test-network')
-rw-r--r--test/test-network/conf/networkd-address-label.conf5
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py4
2 files changed, 8 insertions, 1 deletions
diff --git a/test/test-network/conf/networkd-address-label.conf b/test/test-network/conf/networkd-address-label.conf
new file mode 100644
index 0000000000..253b9f30db
--- /dev/null
+++ b/test/test-network/conf/networkd-address-label.conf
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[IPv6AddressLabel]
+Label=5555
+Prefix=2004:da8:2:0::/64
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 3a30c8bfd1..3cf743dec2 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -3729,12 +3729,14 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
def test_ipv6_address_label(self):
copy_network_unit('25-ipv6-address-label-section.network', '12-dummy.netdev')
+ copy_networkd_conf_dropin('networkd-address-label.conf')
start_networkd()
self.wait_online('dummy98:degraded')
output = check_output('ip addrlabel list')
print(output)
- self.assertRegex(output, '2004:da8:1::/64')
+ self.assertRegex(output, '2004:da8:1::/64 dev dummy98 label 4444')
+ self.assertRegex(output, '2004:da8:2::/64 label 5555')
def test_ipv6_proxy_ndp(self):
copy_network_unit('25-ipv6-proxy-ndp.network', '12-dummy.netdev')