You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we create a socket using socket.socket(socket.AF_INET6, socket.SOCK_STREAM) and then calling bind. However, if the address given to bind is not an address it gets automatically resolved at which point we have no control over if the IPV4 or IPV6 address is actually used.
Correct way to handle this is to use socket.getaddrinfo(addr, None, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE) and create a socket for each of the addresses we found.
The text was updated successfully, but these errors were encountered:
Currently we create a socket using
socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
and then calling bind. However, if the address given to bind is not an address it gets automatically resolved at which point we have no control over if the IPV4 or IPV6 address is actually used.Correct way to handle this is to use
socket.getaddrinfo(addr, None, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
and create a socket for each of the addresses we found.The text was updated successfully, but these errors were encountered: