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

libnetwork/netavark: fix ipam allocation for custom lease range #1510

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Jun 16, 2023

LeaseRange allows to set a custom start and end ip for our allocator. However in this case the allocator ignored that fact the the first ip (network ip) and the last ip (broadcast address only valid for ipv4) cannot be used. These ips are special and should never be assigned.

Interestingly the kernel allows to assign the broadcast address to a interface so it would appear to be working and no error was reported. Only the attempts to make a connection failed.

Fixes containers/podman#18906

@Luap99
Copy link
Member Author

Luap99 commented Jun 16, 2023

@mheon PTAL

LeaseRange allows to set a custom start and end ip for our allocator.
However in this case the allocator ignored that fact the the first ip
(network ip) and the last ip (broadcast address only valid for ipv4)
cannot be used. These ips are special and should never be assigned.

Interestingly the kernel allows to assign the broadcast address to a
interface so it would appear to be working and no error was reported.
Only the attempts to make a connection failed.

Fixes containers/podman#18906

Signed-off-by: Paul Holzinger <[email protected]>
@mheon
Copy link
Member

mheon commented Jun 16, 2023

LGTM

@flouthoc PTAL

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM
/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 4b1b6ad into containers:main Jun 16, 2023
6 checks passed
@Luap99 Luap99 deleted the netavark-ipam branch June 16, 2023 15: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.

podman assigned the broadcast address to a container
4 participants