Browse Source

SDN: Assume IPv6 LLA VTEPs if no IPs configured on underlay

  The exist code generating VTEP interface configurations already distinguishes
  between IPv4 and IPv6 Multicast VTEP IPs based on the existance of any IP set
  on the underlay interface.  If at least one IP address is configured, IPv4 is
  used, whereas if no IP address is configured, IPv6 LLA is used.  This way the
  original design choice for dual-use underlays, Dual Stack IP Routing + BATMAN
  overlay, still is easily supported.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 5 months ago
parent
commit
8620f9d1f5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      _modules/ffho_net.py

+ 3 - 1
_modules/ffho_net.py

@@ -722,8 +722,10 @@ def _generate_vxlan_interface_config (node_config, ifaces, sites_config):
 
 		# Set the MTU of this (probably) VLAN device to the MTU required for a VXLAN underlay
 		# device, where B.A.T.M.A.N. adv. is to be expected within the VXLAN overlay.
+		# If there are NO IPs configured on this interface, it means we will be using IPv6 LLAs
+		# to set up VXLAN tunnel endpoints, so we need more headroom header-wise.
 		underlay_mtu = MTU['vxlan_underlay_iface']
-		if iface.startswith('vlan14'):
+		if not iface_has_prefixes:
 			underlay_mtu = MTU['vxlan_underlay_iface_ipv6']
 
 		_set_mtu_to_iface_and_upper (ifaces, iface, underlay_mtu)