aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-03-15 13:25:44 +0100
committerStefano Brivio <sbrivio@redhat.com>2024-03-18 08:57:21 +0100
commitf919dc7a4b1ced7e80d790a654900415e1d6250e (patch)
tree191d4aa53845e3f6eb2af8156a10b7496c76b04a /conf.c
parentf00b153414b1e57e41cfb49cf0ac15c747f6c910 (diff)
downloadpasst-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar.gz
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar.bz2
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar.lz
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar.xz
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.tar.zst
passt-f919dc7a4b1ced7e80d790a654900415e1d6250e.zip
conf, netlink: Don't require a default route to start
There might be isolated testing environments where default routes and global connectivity are not needed, a single interface has all non-loopback addresses and routes, and still passt and pasta are expected to work. In this case, it's pretty obvious what our upstream interface should be, so go ahead and select the only interface with at least one route, disabling DHCP and implying --no-map-gw as the documentation already states. If there are multiple interfaces with routes, though, refuse to start, because at that point it's really not clear what we should do. Reported-by: Martin Pitt <mpitt@redhat.com> Link: https://github.com/containers/podman/issues/21896 Signed-off-by: Stefano brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index ac9fb34..644752c 100644
--- a/conf.c
+++ b/conf.c
@@ -584,7 +584,7 @@ static unsigned int conf_ip4(unsigned int ifi,
ifi = nl_get_ext_if(nl_sock, AF_INET);
if (!ifi) {
- info("No interface with a default route for IPv4: disabling IPv4");
+ info("No interface with a route for IPv4: disabling IPv4");
return 0;
}
@@ -656,7 +656,7 @@ static unsigned int conf_ip6(unsigned int ifi,
ifi = nl_get_ext_if(nl_sock, AF_INET6);
if (!ifi) {
- info("No interface with a default route for IPv6: disabling IPv6");
+ info("No interface with a route for IPv6: disabling IPv6");
return 0;
}