mirror of https://github.com/fail2ban/fail2ban
BF: Duplicate ip addresses returned from socket.gethostbyname_ex
parent
087af27c65
commit
f460bde73c
|
@ -816,7 +816,7 @@ class DNSUtils:
|
||||||
Thanks to Kevin Drapel.
|
Thanks to Kevin Drapel.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return socket.gethostbyname_ex(dns)[2]
|
return set(socket.gethostbyname_ex(dns)[2])
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
logSys.warn("Unable to find a corresponding IP address for %s: %s"
|
logSys.warn("Unable to find a corresponding IP address for %s: %s"
|
||||||
% (dns, e))
|
% (dns, e))
|
||||||
|
|
Loading…
Reference in New Issue