[PATCH 0/2] Follow up improvements to external interface selection
We just had several rapid passt/pasta releases which last minute fixes for the podman 5.0 release. One of these was to correct pasta's selection of which host interface to use. Here are a couple of less urgent follow ups to improve that logic. David Gibson (2): util: Add helper to return name of address family netlink: Ignore routes to link-local addresses for selecting interface ip.h | 9 +++++++++ netlink.c | 19 ++++++++++++++++--- util.h | 18 ++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) -- 2.44.0
We have a few places where we want to include the name of the internet
protocol version (IPv4 or IPv6) in a message, which we handle with an
open-coded ?: expression.
This seems like something that might be more widely useful, so make a
trivial helper to return the correct string based on the address family.
Signed-off-by: David Gibson
Since f919dc7a4b1c ("conf, netlink: Don't require a default route to
start"), and since 639fdf06ede ("netlink: Fix selection of template
interface") less buggily, we haven't required a default route on the host
in order to operate. Instead, if we lack a default route we'll pick an
interface with any route, as long as there's only one such interface. If
there's more than one, we don't have a good criterion to pick, so we give
up with an informational message.
Paul Holzinger pointed out that this code considers it ambiguous even if
all but one of the interfaces has only routes to link-local addresses
(fe80::/10). A route to link-local addresses isn't really useful from
pasta's point of view, so ignore them instead. This removes a misleading
message in many cases, and a spurious failure in some cases.
Suggested-by: Paul Holzinger
On Thu, 21 Mar 2024 15:04:47 +1100
David Gibson
We just had several rapid passt/pasta releases which last minute fixes for the podman 5.0 release. One of these was to correct pasta's selection of which host interface to use.
Here are a couple of less urgent follow ups to improve that logic.
David Gibson (2): util: Add helper to return name of address family netlink: Ignore routes to link-local addresses for selecting interface
Applied. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio