network: Implement B.A.T.M.A.N. Advanced interface type
This commit is contained in:
committed by
Yu Watanabe
parent
2aaf376597
commit
c0267a592a
@@ -0,0 +1,16 @@
|
||||
[NetDev]
|
||||
Name=bat0
|
||||
Kind=batadv
|
||||
Description=Batman test
|
||||
|
||||
[BatmanAdvanced]
|
||||
GatewayMode=server
|
||||
Aggregation=1
|
||||
BridgeLoopAvoidance=1
|
||||
DistributedArpTable=1
|
||||
Fragmentation=1
|
||||
HopPenalty=10
|
||||
OriginatorIntervalSec=1
|
||||
GatewayBandwithDown=100K
|
||||
GatewayBandwithUp=12K
|
||||
RoutingAlgorithm=batman-v
|
||||
@@ -223,3 +223,14 @@ InterfaceId=
|
||||
[BareUDP]
|
||||
DestinationPort=
|
||||
EtherType=
|
||||
[BatmanAdvanced]
|
||||
GatewayMode=
|
||||
Aggregation=
|
||||
BridgeLoopAvoidance=
|
||||
DistributedArpTable=
|
||||
Fragmentation=
|
||||
HopPenalty=
|
||||
OriginatorIntervalSec=
|
||||
GatewayBandwithDown=
|
||||
GatewayBandwithUp=
|
||||
RoutingAlgorithm=
|
||||
|
||||
@@ -226,6 +226,7 @@ VRF=
|
||||
IgnoreCarrierLoss=
|
||||
KeepConfiguration=
|
||||
DHCPv6PrefixDelegation=
|
||||
BatmanAdvanced=
|
||||
[IPv6Prefix]
|
||||
Prefix=
|
||||
OnLink=
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
[NetDev]
|
||||
Name=batadv99
|
||||
Kind=batadv
|
||||
Description=Batman test
|
||||
|
||||
[BatmanAdvanced]
|
||||
GatewayMode=server
|
||||
RoutingAlgorithm=batman-iv
|
||||
DistributedArpTable=1
|
||||
Fragmentation=0
|
||||
HopPenalty=10
|
||||
OriginatorIntervalSec=1000ms
|
||||
GatewayBandwithDown=205M
|
||||
GatewayBandwithUp=2G
|
||||
@@ -1,5 +1,6 @@
|
||||
[Match]
|
||||
Name=bareudp99
|
||||
Name=batadv99
|
||||
Name=ipvlan99
|
||||
Name=ipvtap99
|
||||
Name=macvlan99
|
||||
|
||||
@@ -779,6 +779,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
links = [
|
||||
'6rdtun99',
|
||||
'bareudp99',
|
||||
'batadv99',
|
||||
'bond98',
|
||||
'bond99',
|
||||
'bridge99',
|
||||
@@ -855,6 +856,7 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
'21-vlan.network',
|
||||
'25-6rd-tunnel.netdev',
|
||||
'25-bareudp.netdev',
|
||||
'25-batadv.netdev',
|
||||
'25-bond.netdev',
|
||||
'25-bond-balanced-tlb.netdev',
|
||||
'25-bridge.netdev',
|
||||
@@ -1014,6 +1016,17 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, 'dstport 1000 ')
|
||||
self.assertRegex(output, 'ethertype ip ')
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('batman-adv')
|
||||
def test_batadv(self):
|
||||
copy_unit_to_networkd_unit_path('25-batadv.netdev', 'netdev-link-local-addressing-yes.network')
|
||||
start_networkd()
|
||||
|
||||
self.wait_online(['batadv99:degraded'])
|
||||
|
||||
output = check_output('ip -d link show batadv99')
|
||||
print(output)
|
||||
self.assertRegex(output, 'batadv')
|
||||
|
||||
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