mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
networkd: add support for setting vlan_tunnel on bridge ports
This commit is contained in:
committed by
Yu Watanabe
parent
2e3efb1884
commit
c88adbc01d
4
test/test-network/conf/14-dummy.netdev
Normal file
4
test/test-network/conf/14-dummy.netdev
Normal file
@@ -0,0 +1,4 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[NetDev]
|
||||
Name=dummy97
|
||||
Kind=dummy
|
||||
11
test/test-network/conf/26-bridge-vlan-tunnel.network
Normal file
11
test/test-network/conf/26-bridge-vlan-tunnel.network
Normal file
@@ -0,0 +1,11 @@
|
||||
[Match]
|
||||
Name=dummy97
|
||||
|
||||
[Link]
|
||||
MTUBytes=9000
|
||||
|
||||
[Network]
|
||||
Bridge=bridge99
|
||||
|
||||
[Bridge]
|
||||
VLANTunnel=true
|
||||
@@ -6027,7 +6027,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
def test_bridge_property(self):
|
||||
copy_network_unit('11-dummy.netdev', '12-dummy.netdev', '26-bridge.netdev',
|
||||
'26-bridge-slave-interface-1.network', '26-bridge-slave-interface-2.network',
|
||||
'25-bridge99.network')
|
||||
'25-bridge99.network', '14-dummy.netdev', '26-bridge-vlan-tunnel.network')
|
||||
start_networkd()
|
||||
self.check_bridge_property()
|
||||
|
||||
@@ -6038,6 +6038,7 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
'26-bridge.netdev',
|
||||
'26-bridge-slave-interface-1.network',
|
||||
'26-bridge-slave-interface-2.network',
|
||||
'26-bridge-vlan-tunnel.network',
|
||||
'25-bridge99.network')
|
||||
networkctl_reload()
|
||||
self.check_bridge_property()
|
||||
@@ -6066,7 +6067,11 @@ class NetworkdBridgeTests(unittest.TestCase, Utilities):
|
||||
self.assertIn('bridge_slave', output)
|
||||
self.assertIn('mtu 9000 ', output)
|
||||
|
||||
output = check_output('ip -d link show dummy97')
|
||||
self.assertIn('vlan_tunnel on ', output)
|
||||
|
||||
remove_link('dummy98')
|
||||
remove_link('dummy97')
|
||||
self.wait_operstate('bridge99', 'no-carrier')
|
||||
|
||||
output = check_output('ip -d link show bridge99')
|
||||
|
||||
Reference in New Issue
Block a user