summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-08-01 13:19:53 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-08-01 16:24:38 +0000
commit67583141f433c31ebccc8eeba06b2b285636e680 (patch)
tree9c1a8e6c12166f015c7204c574aced66744e6ae0 /python
parent4168e03721b2a9595de4090fddf1280d39ccce4c (diff)
downloadvyos-1x-67583141f433c31ebccc8eeba06b2b285636e680.tar.gz
vyos-1x-67583141f433c31ebccc8eeba06b2b285636e680.zip
mtu: T4572: Add DHCP-option MTU to get values from DHCP-server
Ability to get MTU from DHCP-server and don't touch it per any interface change if interface 'dhcp-options mtu' is configured (cherry picked from commit 29b0ee30bf2622a40ca3d17e3f6b9e94e5b62072)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/interface.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 9b08d83de..7dbedea45 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1375,7 +1375,7 @@ class Interface(Control):
# before mangling any IPv6 option. If MTU is less then 1280 IPv6 will be
# automatically disabled by the kernel. Also MTU must be increased before
# configuring any IPv6 address on the interface.
- if 'mtu' in config:
+ if 'mtu' in config and dict_search('dhcp_options.mtu', config) == None:
self.set_mtu(config.get('mtu'))
# Only change IPv6 parameters if IPv6 was not explicitly disabled