summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-15 16:28:09 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-09-17 00:04:59 +0900
commitcc0276cc3eda2164bf1acb017b8cf504adcb7d1a (patch)
treec41f0bc3b10157e50cdf7a3777a6b0f13d9f6c6b
parent8e412d64cec38b06b8074b03f1dc169052519e0a (diff)
downloadsystemd-cc0276cc3eda2164bf1acb017b8cf504adcb7d1a.tar.gz
test-network: add test for [BridgeMDB] section
-rw-r--r--test/test-network/conf/26-bridge-mdb-master.network5
-rw-r--r--test/test-network/conf/26-bridge-mdb-slave.network14
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py13
3 files changed, 32 insertions, 0 deletions
diff --git a/test/test-network/conf/26-bridge-mdb-master.network b/test/test-network/conf/26-bridge-mdb-master.network
new file mode 100644
index 0000000000..b88ea397c4
--- /dev/null
+++ b/test/test-network/conf/26-bridge-mdb-master.network
@@ -0,0 +1,5 @@
+[Match]
+Name=bridge99
+
+[Network]
+IPv6AcceptRA=false
diff --git a/test/test-network/conf/26-bridge-mdb-slave.network b/test/test-network/conf/26-bridge-mdb-slave.network
new file mode 100644
index 0000000000..dbada0b130
--- /dev/null
+++ b/test/test-network/conf/26-bridge-mdb-slave.network
@@ -0,0 +1,14 @@
+[Match]
+Name=test1
+
+[Network]
+IPv6AcceptRA=no
+Bridge=bridge99
+
+[BridgeMDB]
+VLANId=4064
+MulticastGroupAddress=ff02:aaaa:fee5:0000:0000:0000:0001:0003
+
+[BridgeMDB]
+VLANId=4065
+MulticastGroupAddress=224.0.1.1
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index 6660ce06af..12f91bf3c9 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -2870,6 +2870,8 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
'12-dummy.netdev',
'26-bridge.netdev',
'26-bridge-configure-without-carrier.network',
+ '26-bridge-mdb-master.network',
+ '26-bridge-mdb-slave.network',
'26-bridge-slave-interface-1.network',
'26-bridge-slave-interface-2.network',
'26-bridge-vlan-master.network',
@@ -2910,6 +2912,17 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
self.assertRegex(output, f'{i}')
self.assertNotRegex(output, '4095')
+ def test_bridge_mdb(self):
+ copy_unit_to_networkd_unit_path('11-dummy.netdev', '26-bridge-mdb-slave.network',
+ '26-bridge.netdev', '26-bridge-mdb-master.network')
+ start_networkd()
+ self.wait_online(['test1:enslaved', 'bridge99:degraded'])
+
+ output = check_output('bridge mdb show dev bridge99')
+ print(output)
+ self.assertRegex(output, 'dev bridge99 port test1 grp ff02:aaaa:fee5::1:3 permanent *vid 4064')
+ self.assertRegex(output, 'dev bridge99 port test1 grp 224.0.1.1 permanent *vid 4065')
+
def test_bridge_property(self):
copy_unit_to_networkd_unit_path('11-dummy.netdev', '12-dummy.netdev', '26-bridge.netdev',
'26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network',