Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Go to file
Madhu Venugopal d4851b95ec Incorrect assumption with golang net package causes Overlapping IP
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>
2015-05-04 22:31:16 -07:00
libnetwork Incorrect assumption with golang net package causes Overlapping IP 2015-05-04 22:31:16 -07:00