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:
parent
ca1f459364
commit
bd416f5000
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user