mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test-network: add a test case for issue #20373
This commit is contained in:
parent
1171f3f030
commit
988b0660aa
12
test/test-network/conf/26-bridge-issue-20373.netdev
Normal file
12
test/test-network/conf/26-bridge-issue-20373.netdev
Normal file
@ -0,0 +1,12 @@
|
||||
[NetDev]
|
||||
Name=bridge99
|
||||
Kind=bridge
|
||||
|
||||
[Bridge]
|
||||
MulticastQuerier=yes
|
||||
MulticastSnooping=yes
|
||||
Priority=10
|
||||
STP=yes
|
||||
ForwardDelaySec=5
|
||||
MulticastIGMPVersion=2
|
||||
VLANFiltering=yes
|
@ -0,0 +1,20 @@
|
||||
[Match]
|
||||
Name=bridge99
|
||||
|
||||
[Network]
|
||||
VLAN=vlan99
|
||||
IPForward=yes
|
||||
ConfigureWithoutCarrier=yes
|
||||
LLDP=yes
|
||||
IPv6AcceptRA=false
|
||||
|
||||
[Bridge]
|
||||
Learning=yes
|
||||
MulticastRouter=no
|
||||
UseBPDU=yes
|
||||
|
||||
[BridgeVLAN]
|
||||
VLAN=100
|
||||
|
||||
[BridgeVLAN]
|
||||
VLAN=600
|
@ -0,0 +1,29 @@
|
||||
[Match]
|
||||
Name=test1
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
IPForward=yes
|
||||
Bridge=bridge99
|
||||
LinkLocalAddressing=no
|
||||
EmitLLDP=nearest-bridge
|
||||
LLDP=yes
|
||||
|
||||
[Link]
|
||||
RequiredForOnline=no
|
||||
|
||||
[Bridge]
|
||||
Learning=yes
|
||||
MulticastRouter=query
|
||||
UseBPDU=yes
|
||||
|
||||
[BridgeVLAN]
|
||||
VLAN=100
|
||||
EgressUntagged=100
|
||||
PVID=100
|
||||
|
||||
[BridgeVLAN]
|
||||
VLAN=560
|
||||
|
||||
[BridgeVLAN]
|
||||
VLAN=600
|
@ -3415,21 +3415,29 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
links = [
|
||||
'bridge99',
|
||||
'dummy98',
|
||||
'test1']
|
||||
'test1',
|
||||
'vlan99',
|
||||
]
|
||||
|
||||
units = [
|
||||
'11-dummy.netdev',
|
||||
'12-dummy.netdev',
|
||||
'21-vlan.netdev',
|
||||
'21-vlan.network',
|
||||
'26-bridge.netdev',
|
||||
'26-bridge-configure-without-carrier.network',
|
||||
'26-bridge-issue-20373.netdev',
|
||||
'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-issue-20373.network',
|
||||
'26-bridge-vlan-master.network',
|
||||
'26-bridge-vlan-slave-issue-20373.network',
|
||||
'26-bridge-vlan-slave.network',
|
||||
'bridge99-ignore-carrier-loss.network',
|
||||
'bridge99.network']
|
||||
'bridge99.network'
|
||||
]
|
||||
|
||||
routing_policy_rule_tables = ['100']
|
||||
|
||||
@ -3464,6 +3472,25 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, f'{i}')
|
||||
self.assertNotRegex(output, '4095')
|
||||
|
||||
def test_bridge_vlan_issue_20373(self):
|
||||
copy_unit_to_networkd_unit_path('11-dummy.netdev', '26-bridge-vlan-slave-issue-20373.network',
|
||||
'26-bridge-issue-20373.netdev', '26-bridge-vlan-master-issue-20373.network',
|
||||
'21-vlan.netdev', '21-vlan.network')
|
||||
start_networkd()
|
||||
self.wait_online(['test1:enslaved', 'bridge99:degraded', 'vlan99:routable'])
|
||||
|
||||
output = check_output('bridge vlan show dev test1')
|
||||
print(output)
|
||||
self.assertIn('100 PVID Egress Untagged', output)
|
||||
self.assertIn('560', output)
|
||||
self.assertIn('600', output)
|
||||
|
||||
output = check_output('bridge vlan show dev bridge99')
|
||||
print(output)
|
||||
self.assertIn('1 PVID Egress Untagged', output)
|
||||
self.assertIn('100', output)
|
||||
self.assertIn('600', output)
|
||||
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user