From f8c99aebd0e210cd70058cf07bf9fb8e2691c709 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 29 Oct 2020 17:26:17 +0100 Subject: verify: T2587: allow MTU < 1280 when IPv6 is disabled on an interface --- python/vyos/configverify.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python/vyos') diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 833ef3772..d3ca56d11 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -60,19 +60,19 @@ def verify_mtu_ipv6(config): error_msg = f'IPv6 address will be configured on interface "{interface}" ' \ f'thus the minimum MTU requirement is {min_mtu}!' - if not dict_search('ipv6.address.no_default_link_local', config): - raise ConfigError('link-local ' + error_msg) - for address in (dict_search('address', config) or []): if address in ['dhcpv6'] or is_ipv6(address): raise ConfigError(error_msg) - if dict_search('ipv6.address.autoconf', config): - raise ConfigError(error_msg) + tmp = dict_search('ipv6.address', config) + if tmp and 'no_default_link_local' not in tmp: + raise ConfigError('link-local ' + error_msg) - if dict_search('ipv6.address.eui64', config): + if tmp and 'autoconf' in tmp: raise ConfigError(error_msg) + if tmp and 'eui64' in tmp: + raise ConfigError(error_msg) def verify_vrf(config): """ -- cgit v1.2.3