mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Restore config by name
The change to allow CIDR syntax broke for configurations that use name for bmc 'address'. Fix by letting getaddrinfo have a chance to process the ip before trying to pton it.
This commit is contained in:
parent
e5360b3b2f
commit
5a62307d1e
@ -560,6 +560,7 @@ def get_nic_config(configmanager, node, ip=None, mac=None, ifidx=None,
|
||||
if gw is None or not gw:
|
||||
continue
|
||||
gwn = socket.inet_pton(fam, gw)
|
||||
ip = socket.getaddrinfo(ip, 0, proto=socket.IPPROTO_TCP, family=fam)[-1][-1][0]
|
||||
ipn = socket.inet_pton(fam, ip)
|
||||
if ipn_on_same_subnet(fam, ipn, gwn, prefix):
|
||||
cfgdata['ipv{}_gateway'.format(nver)] = gw
|
||||
|
Loading…
Reference in New Issue
Block a user