From fbaa707f72ac1a0214ca57c8768fefa4b818738b Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 6 Apr 2024 12:15:25 +0200 Subject: ethernet: T5862: default MTU is not acceptable in some environments There are cloud environments available where the maximum supported ethernet MTU is e.g. 1450 bytes, thus we clamp this to the adapters maximum MTU value or 1500 bytes - whatever is lower. (cherry picked from commit 8296cc727066e739c178918a91cfc11d20d26fe1) --- python/vyos/configverify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/vyos/configverify.py') diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 18642877a..4cb84194a 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -60,8 +60,8 @@ def verify_mtu_parent(config, parent): mtu = int(config['mtu']) parent_mtu = int(parent['mtu']) if mtu > parent_mtu: - raise ConfigError(f'Interface MTU ({mtu}) too high, ' \ - f'parent interface MTU is {parent_mtu}!') + raise ConfigError(f'Interface MTU "{mtu}" too high, ' \ + f'parent interface MTU is "{parent_mtu}"!') def verify_mtu_ipv6(config): """ @@ -76,7 +76,7 @@ def verify_mtu_ipv6(config): if int(config['mtu']) < min_mtu: interface = config['ifname'] error_msg = f'IPv6 address will be configured on interface "{interface}",\n' \ - f'the required minimum MTU is {min_mtu}!' + f'the required minimum MTU is "{min_mtu}"!' if 'address' in config: for address in config['address']: -- cgit v1.2.3