Merge pull request #16929 from ssahani/network-bare-udp
network: introduce Bare UDP Tunnelling
This commit is contained in:
@@ -216,3 +216,6 @@ Activate=
|
||||
[Xfrm]
|
||||
Independent=
|
||||
InterfaceId=
|
||||
[BareUDP]
|
||||
DestinationPort=
|
||||
EtherType=
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[NetDev]
|
||||
Kind=bareudp
|
||||
Name=bareudp99
|
||||
|
||||
[BareUDP]
|
||||
DestinationPort=1000
|
||||
EtherType=ipv4
|
||||
@@ -1,4 +1,5 @@
|
||||
[Match]
|
||||
Name=bareudp99
|
||||
Name=ipvlan99
|
||||
Name=ipvtap99
|
||||
Name=macvlan99
|
||||
|
||||
@@ -732,6 +732,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
|
||||
links = [
|
||||
'6rdtun99',
|
||||
'bareudp99',
|
||||
'bond99',
|
||||
'bridge99',
|
||||
'dropin-test',
|
||||
@@ -806,6 +807,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
'21-vlan.netdev',
|
||||
'21-vlan.network',
|
||||
'25-6rd-tunnel.netdev',
|
||||
'25-bareudp.netdev',
|
||||
'25-bond.netdev',
|
||||
'25-bond-balanced-tlb.netdev',
|
||||
'25-bridge.netdev',
|
||||
@@ -952,6 +954,18 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
self.wait_operstate('bridge99', '(off|no-carrier)', setup_state='configuring')
|
||||
self.wait_operstate('test1', 'degraded')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('bareudp')
|
||||
def test_bareudp(self):
|
||||
copy_unit_to_networkd_unit_path('25-bareudp.netdev', 'netdev-link-local-addressing-yes.network')
|
||||
start_networkd()
|
||||
|
||||
self.wait_online(['bareudp99:degraded'])
|
||||
|
||||
output = check_output('ip -d link show bareudp99')
|
||||
print(output)
|
||||
self.assertRegex(output, 'dstport 1000 ')
|
||||
self.assertRegex(output, 'ethertype ip ')
|
||||
|
||||
def test_bridge(self):
|
||||
copy_unit_to_networkd_unit_path('25-bridge.netdev', '25-bridge-configure-without-carrier.network')
|
||||
start_networkd()
|
||||
|
||||
Reference in New Issue
Block a user