From bd416f500050311ce3443e3e86d3052bbdd05513 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 3 Nov 2022 14:43:49 -0400 Subject: [PATCH] Fix ipv4-free configuration in netutil --- confluent_server/confluent/netutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/netutil.py b/confluent_server/confluent/netutil.py index 39178613..2b6cfa23 100644 --- a/confluent_server/confluent/netutil.py +++ b/confluent_server/confluent/netutil.py @@ -301,7 +301,7 @@ def get_flat_net_config(configmanager, node): return ret def add_netmask(ncfg): - if '/' in ncfg['ipv4_address']: + if '/' in ncfg.get('ipv4_address', ''): plen = ncfg['ipv4_address'].split('/', 1)[1] ncfg['ipv4_netmask'] = cidr_to_mask(int(plen))