While commit f919dc7a4b1c ("conf, netlink:
Don't require a default
route to start") sounded reasonable in the assumption that, if we
don't find default routes for a given address family, we can still
proceed by selecting an interface with any route *iff it's the only
one for that protocol family*, Jelle reported a further issue in a
similar setup.
There, multiple interfaces are present, and while remote container
connectivity doesn't matter for the container, local connectivity is
desired. There are no default routes, but those multiple interfaces
all have non-default routes, so we should just pick one and start.
Pick the first interface reported by the kernel with any route, if
there are no default routes. There should be no harm in doing so.
Reported-by: Jelle van der Waa<jvanderwaa(a)redhat.com>
Reported-by: Martin Pitt<mpitt(a)redhat.com>
Link:https://bugzilla.redhat.com/show_bug.cgi?id=2277954
Signed-off-by: Stefano Brivio<sbrivio(a)redhat.com>
Reviewed-by: Paul Holzinger <pholzing(a)redhat.com>
--
Paul Holzinger