diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-01-21 20:31:07 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-01-22 08:08:27 +0100 |
commit | ef654941d1b7d3bd8f5af51418aa54e0d6f2d48c (patch) | |
tree | 0d22b1af8408cba9499da16e565cb7e48a845330 /libpod/container_internal_linux.go | |
parent | 5e65f0ba30f3fca73f8c207825632afef08378c1 (diff) | |
download | podman-ef654941d1b7d3bd8f5af51418aa54e0d6f2d48c.tar.gz podman-ef654941d1b7d3bd8f5af51418aa54e0d6f2d48c.tar.bz2 podman-ef654941d1b7d3bd8f5af51418aa54e0d6f2d48c.zip |
libpod: move slirp magic IPs to consts
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 0553cc59c..b41a3fa38 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1700,7 +1700,7 @@ func (c *Container) generateResolvConf() (string, error) { nameservers = resolvconf.GetNameservers(resolv.Content) // slirp4netns has a built in DNS server. if c.config.NetMode.IsSlirp4netns() { - nameservers = append([]string{"10.0.2.3"}, nameservers...) + nameservers = append([]string{slirp4netnsDNS}, nameservers...) } } @@ -1780,7 +1780,7 @@ func (c *Container) getHosts() string { if c.Hostname() != "" { if c.config.NetMode.IsSlirp4netns() { // When using slirp4netns, the interface gets a static IP - hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s %s\n", "10.0.2.100", c.Hostname(), c.config.Name) + hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s %s\n", slirp4netnsIP, c.Hostname(), c.config.Name) } else { hasNetNS := false netNone := false |