fixed badly computed large ipv6

This commit is contained in:
Nicolas Coevoet 2013-10-17 23:56:57 +02:00
parent 6b71f54927
commit b258f94718

View File

@ -207,7 +207,7 @@ def getBestPattern (n):
if host.startswith('gateway/web/freenode/ip.') or host.startswith('gateway/tor-sasl/') or host.startswith('unaffiliated/'): if host.startswith('gateway/web/freenode/ip.') or host.startswith('gateway/tor-sasl/') or host.startswith('unaffiliated/'):
ident = '*' ident = '*'
if n.ip != None: if n.ip != None:
if n.ip.find('::') > 4: if len(n.ip.split('::')) > 4:
# large ipv6 # large ipv6
a = n.ip.split(':') a = n.ip.split(':')
m = a[0]+':'+a[1]+':'+a[2]+':'+a[3]+':*' m = a[0]+':'+a[1]+':'+a[2]+':'+a[3]+':*'