moby/libnetwork/ipam
Albin Kerouanton 58224457c3
ipam: Replace ChildSubnet with parent Subnet when its mask is bigger
Prior to moby/moby#44968, libnetwork would happily accept a ChildSubnet
with a bigger mask than its parent subnet. In such case, it was
producing IP addresses based on the parent subnet, and the child subnet
was not allocated from the address pool.

This commit automatically fixes invalid ChildSubnet for networks stored
in libnetwork's datastore.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 3e8af0817a)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-14 17:50:01 +02:00
..
allocator.go ipam: Replace ChildSubnet with parent Subnet when its mask is bigger 2023-09-14 17:50:01 +02:00
allocator_test.go libnet/ipam: use netip types internally 2023-02-23 18:10:01 -05:00
parallel_test.go libnet/ipam: drop vestiges of custom addrSpaces 2023-02-23 18:09:22 -05:00
structures.go libnet/ipam: use netip types internally 2023-02-23 18:10:01 -05:00
utils.go libnet/ipam: use netip types internally 2023-02-23 18:10:01 -05:00