summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-02-01 15:58:27 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2022-02-02 11:01:09 -0500
commita1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e (patch)
tree95d2f1d578949c885acc74abbe17f15efd3cea36 /cmd
parent4ddc4e79d73eea56929ed522f7d7fce6285a41d4 (diff)
downloadpodman-a1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e.tar.gz
podman-a1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e.tar.bz2
podman-a1bc8cb52cefd49e8cc54ae14d1864b8a1ec216e.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