1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fix DNS resolution check error on Debian systems

This commit is contained in:
checktheroads
2020-10-11 16:08:25 -07:00
parent c864712f40
commit 0f1afc4293

View File

@@ -912,9 +912,10 @@ def resolve_hostname(hostname: str) -> Generator:
for sock in res:
if sock[0].value == 2 and ip4 is None:
ip4 = ip_address(sock[4][0])
elif sock[0].value == 30 and ip6 is None:
elif sock[0].value in (10, 30) and ip6 is None:
ip6 = ip_address(sock[4][0])
except (gaierror, ValueError, IndexError):
except (gaierror, ValueError, IndexError) as err:
log.debug(str(err))
pass
yield ip4