[PATCH] netlink: Don't warn about multiple interfaces when there's only one
Suppose there is a single network interface on the host, with two
addresses of different prefixes assigned to it.
In this situation, running pasta to create an isolated netns prints
"Multiple interfaces with %s routes, picked first", even though there
is in fact only one candidate interface.
Reproducer:
sudo ip link add dummy42 type dummy
sudo ip link set dev dummy42 up
sudo ip addr add fdaa:aaaa:aaaa::1/64 dev dummy42
sudo ip addr add fdbb:bbbb:bbbb::1/64 dev dummy42
pasta --config-net -- true
This message is meant to indicate that there are multiple candidate
interfaces, but in fact there is only one, which can mislead users.
Therefore, avoid printing this message when there are multiple non-default
routes that all belong to the same interface.
Fixes: 450a6131beab ("netlink: With no default route, pick the first interface with a route")
Signed-off-by: Hayato Kiwata
On Sat, 22 Aug 2026 17:48:56 +0900
Hayato Kiwata
Suppose there is a single network interface on the host, with two addresses of different prefixes assigned to it.
In this situation, running pasta to create an isolated netns prints "Multiple interfaces with %s routes, picked first", even though there is in fact only one candidate interface.
Reproducer:
sudo ip link add dummy42 type dummy sudo ip link set dev dummy42 up sudo ip addr add fdaa:aaaa:aaaa::1/64 dev dummy42 sudo ip addr add fdbb:bbbb:bbbb::1/64 dev dummy42
pasta --config-net -- true
This message is meant to indicate that there are multiple candidate interfaces, but in fact there is only one, which can mislead users.
Therefore, avoid printing this message when there are multiple non-default routes that all belong to the same interface.
Fixes: 450a6131beab ("netlink: With no default route, pick the first interface with a route") Signed-off-by: Hayato Kiwata
Applied, thanks, and sorry for the delay! -- Stefano
participants (2)
-
Hayato Kiwata
-
Stefano Brivio