devplayer0 / docker-net-dhcp

Docker network driver for networking on a host bridge with DHCP-allocated IP addresses
GNU General Public License v3.0
193 stars 55 forks source link

Fix bridge conflict detection #20

Closed devplayer0 closed 3 years ago

devplayer0 commented 3 years ago

Bridge conflict detection was broken since it would check bridge ranges that use the null IPAM driver (e.g. this very plugin!). null specifies a subnet of 0.0.0.0/0, which would obviously pass any IP range check. Any network using null or a /0 mask will be skipped, and other docker-net-dhcp networks' bridges will be compared in addition.

If the user wants to re-use the same bridge across multiple networks (not really recommended) or for some reason the conflict detection is still wrong, the new ignore_conflicts option can be used.

Fixes #18.