From 10240f48a090d5a43491225e5a95e63d77c585b2 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Tue, 26 May 2026 13:21:54 +0000 Subject: [PATCH] krun: passt - don't map the gateway address If the gateway for the network is also the DNS server we won't be able to query the DNS server without --no-map-gw. See discussion in https://github.com/containers/crun/pull/2099 Signed-off-by: Dusty Mabe --- src/libcrun/handlers/krun.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libcrun/handlers/krun.c b/src/libcrun/handlers/krun.c index 6e249a9b46..6092988d27 100644 --- a/src/libcrun/handlers/krun.c +++ b/src/libcrun/handlers/krun.c @@ -567,7 +567,7 @@ libkrun_start_passt (void *cookie, libcrun_container_t *container) { struct krun_config *kconf = (struct krun_config *) cookie; pid_t pid; - char *passt_argv[9]; + char *passt_argv[10]; char fd_as_str[16]; int use_passt; int argv_idx; @@ -598,6 +598,12 @@ libkrun_start_passt (void *cookie, libcrun_container_t *container) passt_argv[argv_idx++] = (char *) "--no-dhcp-dns"; } + /* Set --no-map-gw. If the gateway for the network is also the DNS server + * we won't be able to query the DNS server without --no-map-gw. + * See discussion in https://github.com/containers/crun/pull/2099 + */ + passt_argv[argv_idx++] = (char *) "--no-map-gw"; + passt_argv[argv_idx++] = (char *) "--fd"; passt_argv[argv_idx++] = fd_as_str; passt_argv[argv_idx] = NULL;