mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-05-14 10:33:46 +00:00
using a len(net.IP) to check for ipv4 or ipv6 is a bad idea. And that was exactly done in NetworkOverlaps() function with the assumption that any ipv4 net.IP will be of 4 bytes. Golang Net package makes no such assumptions. This assumption actually broke a particular use-case where the NetworkOverlaps fails to identify a genuine overlap and that causes datapath issues. With this fix, we explicitely check for v4 or v6 Signed-off-by: Madhu Venugopal <madhu@docker.com>