summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Niasoff <4070285+dniasoff@users.noreply.github.com>2024-01-01 17:27:58 +0000
committerDaniel Niasoff <4070285+dniasoff@users.noreply.github.com>2024-01-01 17:39:15 +0000
commitfe106462f0daa6ec9536887cf3732a9d8e056a60 (patch)
tree20ec129457dd37adff22cc307a7f186d31d3b17b
parent20308464317d172e8c4c5afff055c5c34edc6015 (diff)
downloadvyos-cloud-init-fe106462f0daa6ec9536887cf3732a9d8e056a60.tar.gz
vyos-cloud-init-fe106462f0daa6ec9536887cf3732a9d8e056a60.zip
fix to handle OpenStack where mtu exists but is null
-rw-r--r--cloudinit/config/cc_vyos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index 8f2e7f46..550811b7 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -466,7 +466,7 @@ def set_config_interfaces_v1(config, iface_config: dict):
config.set_tag(['interfaces', 'ethernet'])
# configre MTU
- if 'mtu' in iface_config:
+ if 'mtu' in iface_config and iface_config['mtu'] is not None:
set_ether_mtu(config, iface_name, iface_config['mtu'])
# We still need to set default MTU for Ethernet, for compatibility reasons
else: