mirror of https://github.com/fail2ban/fail2ban
- Fixed bug #1262345
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@184 a942ae1a-1317-0410-a47c-b1dcaea8d6050.5
parent
daf35a3535
commit
c5c90b182a
|
@ -58,8 +58,9 @@ def searchIP(text):
|
|||
def isValidIP(str):
|
||||
""" Return true if str is a valid IP
|
||||
"""
|
||||
s = str.split('/', 1)
|
||||
try:
|
||||
socket.inet_aton(str)
|
||||
socket.inet_aton(s[0])
|
||||
return True
|
||||
except socket.error:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue