mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-28 11:57:37 +00:00
Fix bad lookup attempts on slashed addr
While this should in theory be harmless, it exacerbates some DNS setups that would look up the normal result quickly, but would stall on a bad lookup.
This commit is contained in:
parent
9c1e7a7142
commit
09ce824c85
@ -198,8 +198,9 @@ class NetManager(object):
|
||||
ipv4addr = attribs.get('ipv4_address', None)
|
||||
if ipv4addr:
|
||||
try:
|
||||
for ai in socket.getaddrinfo(ipv4addr, 0, socket.AF_INET, socket.SOCK_STREAM):
|
||||
ipv4addr = ai[-1][0]
|
||||
luaddr = ipv4addr.split('/', 1)[0]
|
||||
for ai in socket.getaddrinfo(luaddr, 0, socket.AF_INET, socket.SOCK_STREAM):
|
||||
ipv4addr.replace(luaddr, ai[-1][0])
|
||||
except socket.gaierror:
|
||||
pass
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user