aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-02-01 15:58:27 -0500
committerMatthew Heon <matthew.heon@pm.me>2022-02-03 16:21:26 -0500
commit48f10e1d0d5873c7baa0613156294307f8c9942d (patch)
treeb750ce0e49a68f2282b7bdb602334e2696087cdd /cmd
parent938d5152ca6a2e347cd62aaba25c178fd077a235 (diff)
downloadpodman-48f10e1d0d5873c7baa0613156294307f8c9942d.tar.gz
podman-48f10e1d0d5873c7baa0613156294307f8c9942d.tar.bz2
podman-48f10e1d0d5873c7baa0613156294307f8c9942d.zip
Move each search dns to its own line
Alpine does not seem to use search correctly when there are multiple search domains on the same line. It only uses the first with the advent. When podman runs within a separate network we are appending on dns.podman as a search, if you add a search domain, then this causes the local search on network to fail. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/netflags.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/podman/common/netflags.go b/cmd/podman/common/netflags.go
index cfe4956b0..9dfe81d62 100644
--- a/cmd/podman/common/netflags.go
+++ b/cmd/podman/common/netflags.go
@@ -103,7 +103,7 @@ func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet) (*enti
opts = &entities.NetOptions{}
}
- if flags.Changed("add-hosts") {
+ if flags.Changed("add-host") {
opts.AddHosts, err = flags.GetStringSlice("add-host")
if err != nil {
return nil, err
@@ -178,11 +178,9 @@ func NetFlagsToNetOptions(opts *entities.NetOptions, flags pflag.FlagSet) (*enti
}
}
- if flags.Changed("no-host") {
- opts.NoHosts, err = flags.GetBool("no-hosts")
- if err != nil {
- return nil, err
- }
+ opts.NoHosts, err = flags.GetBool("no-hosts")
+ if err != nil {
+ return nil, err
}
// parse the network only when network was changed