summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-29 18:14:51 +0200
committerGitHub <noreply@github.com>2022-07-29 18:14:51 +0200
commit9310ed82e1e3800e68255b0166ff741c5e84e587 (patch)
tree8113c594e984516ebb57ee35b3ce38d76a05e66e /src/conf_mode
parentbcbfc8cc0ad42bf7bb025b7a6dae6e376978fda4 (diff)
parent319102b7f9ea384127b685de7cfbef2a6ade52df (diff)
downloadvyos-1x-9310ed82e1e3800e68255b0166ff741c5e84e587.tar.gz
vyos-1x-9310ed82e1e3800e68255b0166ff741c5e84e587.zip
Merge pull request #1440 from sever-sever/T4570
vxlan: T4570: Verify MTU for remote address if source not defined
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-vxlan.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index bf0f6840d..af2d0588d 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -118,6 +118,11 @@ def verify(vxlan):
# in use.
vxlan_overhead += 20
+ # If source_address is not used - check IPv6 'remote' list
+ elif 'remote' in vxlan:
+ if any(is_ipv6(a) for a in vxlan['remote']):
+ vxlan_overhead += 20
+
lower_mtu = Interface(vxlan['source_interface']).get_mtu()
if lower_mtu < (int(vxlan['mtu']) + vxlan_overhead):
raise ConfigError(f'Underlaying device MTU is to small ({lower_mtu} '\