Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0 backport] ipam: Replace ChildSubnet with parent Subnet when its mask is bigger #46482

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

akerouanton
Copy link
Member

@akerouanton akerouanton commented Sep 14, 2023

Prior to 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 3e8af08)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
@thaJeztah thaJeztah changed the title [backport 24.0] ipam: Replace ChildSubnet with parent Subnet when its mask is bigger [24.0 backport] ipam: Replace ChildSubnet with parent Subnet when its mask is bigger Sep 14, 2023
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 74e3528 into moby:24.0 Sep 14, 2023
102 checks passed
@akerouanton akerouanton deleted the cp-24.0-3e8af081 branch September 14, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants