2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Fix ipv4-free configuration in netutil

This commit is contained in:
Jarrod Johnson 2022-11-03 14:43:49 -04:00
parent ca1f459364
commit bd416f5000

View File

@ -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))