1

2 Commits

Author SHA1 Message Date
Ilya Bakulin
2a338c9e80 net: Support for IPv6, correctly validate IP addresses
Since socket.gethostbyname_ex() doesn't support IPv6, switch to using
socket.getaddrinfo()

Additionally validate IP addresses using inet_pton() instead of simply
counting dots in the string. Counting dots fails if the domain name
contains 3 dots (www6.mail.bakulin.de) and doesn't work with IPv6.

Unfortunately we cannot use ipaddress module because it's available
only in Python 3.
2014-10-29 15:22:16 +01:00
diSabler
e5295eb994 add: initial AI support 2014-05-01 14:07:44 +04:00