From e30c9853344ba4a613f9daae9e8085b4c09c92a7 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 8 Mar 2024 14:15:01 +0100 Subject: [PATCH] Revert "libnetwork/pasta: pass --dns none" This reverts commit 92784a233765c5ed63d0df784e4994f33f2327f0. I plan on using --dns-forward now so we do not want to disable dns by default, see [1]. [1] https://github.com/containers/podman/issues/19213 Signed-off-by: Paul Holzinger --- libnetwork/pasta/pasta.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libnetwork/pasta/pasta.go b/libnetwork/pasta/pasta.go index a22135bb8..22beda031 100644 --- a/libnetwork/pasta/pasta.go +++ b/libnetwork/pasta/pasta.go @@ -59,7 +59,6 @@ func Setup2(opts *SetupOptions) (*SetupResult, error) { NoTCPNamespacePorts := true NoUDPNamespacePorts := true NoMapGW := true - NoDNS := true path, err := opts.Config.FindHelperBinary(BinaryName, true) if err != nil { @@ -115,8 +114,6 @@ func Setup2(opts *SetupOptions) (*SetupResult, error) { NoMapGW = false // not an actual pasta(1) option cmdArgs = append(cmdArgs[:i], cmdArgs[i+1:]...) - case "-D", "--dns", "--dns-forward": - NoDNS = false } } @@ -135,12 +132,6 @@ func Setup2(opts *SetupOptions) (*SetupResult, error) { if NoMapGW { cmdArgs = append(cmdArgs, "--no-map-gw") } - if NoDNS { - // disable pasta reading from /etc/resolv.conf which hides the - // "Couldn't get any nameserver address" warning when only - // localhost resolvers are configured. - cmdArgs = append(cmdArgs, "--dns", "none") - } // always pass --quiet to silence the info output from pasta cmdArgs = append(cmdArgs, "--quiet", "--netns", opts.Netns)