summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-22 17:56:12 +0100
committerGitHub <noreply@github.com>2023-02-22 17:56:12 +0100
commit22d1d865358198fc7d1847499162a629105fe6ba (patch)
tree6f09fc7badb9059409f5425af0697ec31566819c /python/vyos/configverify.py
parent06fde32affc64068af44fd818062ed2913c323f9 (diff)
parent06d9c549c7b32f9108ec97b16aa01a43cbb9a6e9 (diff)
downloadvyos-1x-22d1d865358198fc7d1847499162a629105fe6ba.tar.gz
vyos-1x-22d1d865358198fc7d1847499162a629105fe6ba.zip
Merge pull request #1833 from sever-sever/T5011-eq
T5011: Set default values for min_mtu max_mtu
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 0085ad5e4..6afb1c596 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -36,8 +36,14 @@ def verify_mtu(config):
mtu = int(config['mtu'])
tmp = Interface(config['ifname'])
- min_mtu = tmp.get_min_mtu()
- max_mtu = tmp.get_max_mtu()
+ # Not all interfaces support min/max MTU
+ # https://vyos.dev/T5011
+ try:
+ min_mtu = tmp.get_min_mtu()
+ max_mtu = tmp.get_max_mtu()
+ except: # Fallback to defaults
+ min_mtu = 68
+ max_mtu = 9000
if mtu < min_mtu:
raise ConfigError(f'Interface MTU too low, ' \