summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/net/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 2bfaf149..88d0061c 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -303,6 +303,9 @@ def load_klibc_net_cfg(data_mapping):
entry_ns['subnets'].append({'type': 'dhcp4'})
if data_mapping.get('IPV6ADDR'):
entry_ns['subnets'].append({'type': 'dhcp6'})
+ elif data_mapping.get('PROTO') in ['static', 'none']:
+ entry_ns['subnets'].append(
+ {'type': 'static', 'address': data_mapping.get('IPV4ADDR')})
if data_mapping.get('IPV4ADDR'):
entry_ns['address'] = data_mapping['IPV4ADDR']