diff --git a/ejabberd_c2s_types b/ejabberd_c2s_types index 32ce8b0..8df11c4 100755 --- a/ejabberd_c2s_types +++ b/ejabberd_c2s_types @@ -5,6 +5,7 @@ import subprocess import sys +import ipaddr if 'autoconf' in sys.argv: print('yes') @@ -57,7 +58,8 @@ for line in stdout: if 'compressed' in conn: compressed += 1 - if ip.startswith('::FFFF:'): + addrx = ipaddr.IPAddress(ip) + if addrx.version == 4: ipv4 += 1 else: ipv6 += 1