def cidr_overlap(c1, c2):
    r1_ipstart, r1_ipend = cidr2range(c1)
    r2_ipstart, r2_ipend = cidr2range(c2)
    return ip_ranges_overlap(r1_ipstart, r1_ipend, r2_ipstart, r2_ipend)
Check if IP ranges given as CIDR strings overlap
dataset/ETHPy150Open securitykiss-com/rfw/rfw/iputil.py/cidr_overlap