summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-18 15:52:19 +0100
committerGitHub <noreply@github.com>2023-02-18 15:52:19 +0100
commit1e0db9ac6e8b96d2935bd722afeae7df0d6cfd36 (patch)
treee04eac03d5fe315ffe4e1ced87a6d12323cac751
parentb4d25eafdba1150176f71598a770bc694b51054e (diff)
parent87fb9be4cab3a261406c69c723add7467e4ef1fa (diff)
downloadvyos-1x-1e0db9ac6e8b96d2935bd722afeae7df0d6cfd36.tar.gz
vyos-1x-1e0db9ac6e8b96d2935bd722afeae7df0d6cfd36.zip
Merge pull request #1830 from sever-sever/T5011
T5011: Set default values for min_mtu max_mtu
-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 fcc8cc733..8fddd91d0 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, ' \