summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-31 21:38:17 +0200
committerChristian Poessinger <christian@poessinger.com>2022-03-31 21:38:17 +0200
commit53e20097d227ebf4bdb4dc6c85427ec9c5ec3982 (patch)
tree6e71d12b4598afc7595ca783170773295b42a968 /python
parent86168af4b95c64452e3f049e4f4c15cbaf55caff (diff)
downloadvyos-1x-53e20097d227ebf4bdb4dc6c85427ec9c5ec3982.tar.gz
vyos-1x-53e20097d227ebf4bdb4dc6c85427ec9c5ec3982.zip
vyos.ifconfig: T4330: bugfix changing MTU when IPv6 is disabled
Commit f8b3d8999c ("ipv6: T4319: do not configure IPv6 related settings if it's disabled") moved the MTU configuration part under the code path which is only run if IPv6 is enabled on the system. This prevented MTU changes on IPv6 disabled systems.
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/ifconfig/interface.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 6b9a4d03e..f39da90e4 100755
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1530,10 +1530,6 @@ class Interface(Control):
value = tmp if (tmp != None) else '1'
self.set_ipv6_dad_messages(value)
- # MTU - Maximum Transfer Unit
- if 'mtu' in config:
- self.set_mtu(config.get('mtu'))
-
# Delete old IPv6 EUI64 addresses before changing MAC
for addr in (dict_search('ipv6.address.eui64_old', config) or []):
self.del_ipv6_eui64_address(addr)
@@ -1550,6 +1546,10 @@ class Interface(Control):
for addr in tmp:
self.add_ipv6_eui64_address(addr)
+ # MTU - Maximum Transfer Unit
+ if 'mtu' in config:
+ self.set_mtu(config.get('mtu'))
+
# re-add ourselves to any bridge we might have fallen out of
if 'is_bridge_member' in config:
bridge_dict = config.get('is_bridge_member')