Use socket.inet_pton in main.bootstrap_from_dns() to support IPv6 addrs

This commit is contained in:
Lee Miller 2024-07-14 04:51:09 +03:00
parent 54c45839f8
commit 95219b0f25
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -110,7 +110,7 @@ def bootstrap_from_dns():
):
try:
addr = item[4][0]
socket.inet_aton(addr)
socket.inet_pton(item[0], addr)
except (TypeError, socket.error):
continue
else: