diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-29 18:14:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 18:14:51 +0200 |
commit | 9310ed82e1e3800e68255b0166ff741c5e84e587 (patch) | |
tree | 8113c594e984516ebb57ee35b3ce38d76a05e66e | |
parent | bcbfc8cc0ad42bf7bb025b7a6dae6e376978fda4 (diff) | |
parent | 319102b7f9ea384127b685de7cfbef2a6ade52df (diff) | |
download | vyos-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
-rwxr-xr-x | src/conf_mode/interfaces-vxlan.py | 5 |
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} '\ |