-
Notifications
You must be signed in to change notification settings - Fork 201
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/pasta: do not ignore ipv4 link local #2258
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
@mheon PTAL For reference that is what I have been testing with locally, using setting CONTAINERS_HELPER_BINARY_DIR to the passt repo so I can test the new version as I don't have it installed in $PATH. Then using
|
LGTM |
Starting with pasta 2024_11_27.c0fbc7e there is new "local mode"[1] in pasta that defaults to setting up link local addresses in the netns when no suitable interface was found. this is done to fix the podman issue[2] where we fail to start in these cases which was a poor UX. Now the pasta change alone works fine for these users but there is one problem. Podman adds hosts entries for the container ip/name tuple and for the host.containers.internal. These entries are filtered out thus neither ipv4 or ipv6 bool was set and no addresses where added to IPAddresses. Thus podman had no info to add entries and just left them empty, while for most cases this is fine there might be a few users who expect host.containers.internal and the container name to resolve correctly. This commit changes the logic to only skip ipv6 link local addresses but allow ipv4 link local addresses. With that podman will add the proper entry. [1] https://archives.passt.top/passt-dev/[email protected]/ [2] containers/podman#24614 Signed-off-by: Paul Holzinger <[email protected]>
0951858
to
0b0b18e
Compare
LGTM |
Starting with pasta 2024_11_27.c0fbc7e there is new "local mode"[1] in pasta that defaults to setting up link local addresses in the netns when no suitable interface was found. this is done to fix the podman issue[2] where we fail to start in these cases which was a poor UX. Now the pasta change alone works fine for these users but there is one problem.
Podman adds hosts entries for the container ip/name tuple and for the host.containers.internal. These entries are filtered out thus neither ipv4 or ipv6 bool was set and no addresses where added to IPAddresses. Thus podman had no info to add entries and just left them empty, while for most cases this is fine there might be a few users who expect host.containers.internal and the container name to resolve correctly.
This commit changes the logic to only skip ipv6 link local addresses but allow ipv4 link local addresses. With that podman will add the proper entry.
[1] https://archives.passt.top/passt-dev/[email protected]/
[2] containers/podman#24614