/64 ipv6 net by default

This commit is contained in:
Nikolay Shopik 2017-05-09 21:44:04 +03:00
parent 1a260445b7
commit 0806ce4345

View File

@ -366,8 +366,8 @@ def _mask_ip(ipaddr):
ipaddr_s = ipaddress.ip_interface(ipaddr + '/24')
return str(ipaddr_s.network).replace('0/24', 'xxx')
if ipaddr_s.version == 6:
ipaddr_s = ipaddress.ip_interface(ipaddr + '/48')
return str(ipaddr_s.network).replace(':/48', 'xxxx::')
ipaddr_s = ipaddress.ip_interface(ipaddr + '/64')
return str(ipaddr_s.network).replace(':/64', 'xxxx::')
return None
def _dpi_send(host, port, data, fragment_size=0, fragment_count=0):