From f8622c6f922b5da904e9c3cf7d62b085420dca9c Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 23 Aug 2023 16:26:00 +0200 Subject: [PATCH] fixes IPAddr.searchIP for IPv6 (IPv4 group scanning plain IPv6 is None) --- fail2ban/server/ipdns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/server/ipdns.py b/fail2ban/server/ipdns.py index 22080ff7..7ca1e432 100644 --- a/fail2ban/server/ipdns.py +++ b/fail2ban/server/ipdns.py @@ -664,7 +664,7 @@ class IPAddr(object): if not match: return None ipstr = match.group('IPv4') - if ipstr != '': + if ipstr is not None and ipstr != '': return ipstr return match.group('IPv6')