summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2021-06-27 19:50:42 +0200
committerGitHub <noreply@github.com>2021-06-27 19:50:42 +0200
commit34346ee6ea7ff60c4d3c041482b686cdbc7614ab (patch)
tree70972892ded21bcd91da784bcda18b9c244c71e4
parentb763f41064acbdf2b7844584950650d4093acb9e (diff)
parent6251f4424364849040c368e42ccc46b7e38fdb40 (diff)
downloadvyos-cloud-init-34346ee6ea7ff60c4d3c041482b686cdbc7614ab.tar.gz
vyos-cloud-init-34346ee6ea7ff60c4d3c041482b686cdbc7614ab.zip
Merge pull request #43 from UnicronNL/crux
T3653: Cloudinit subnet error if a cidr (/24) is used instead of a su…
-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 fa82d75f..2cd45a32 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -135,7 +135,7 @@ def set_config_ovf(config, ovf_environment):
# Configure an interface and default route
if ip_address and ip_mask and gateway:
- ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask)).with_prefixlen
+ ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask.replace('/', ''))).with_prefixlen
logger.debug("Configuring the IP address on the eth0 interface: {}".format(ip_address_cidr))
set_ipaddress(config, 'eth0', ip_address_cidr)