ungleich-learning-circle/kjg/IPv6/ula/ularegistry/checkip.py

13 lines
237 B
Python

import ipaddress
def overlapip(ip1, ip2):
test1 = ipaddress.IPv6Network(ip1).overlaps(ipaddress.IPv6Network(ip2))
if test1 :
print("overlap")
return 0
else:
print("no overlap")
return 1