diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-06-15 13:26:02 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-06-15 13:41:14 +0200 |
commit | 9c81b8cf7219e7e7507e41e867295ff158028a0a (patch) | |
tree | aa8793d31a9dbdb9dfdf0f16c08f00500cc44314 /libpod/container_internal_linux.go | |
parent | e2f51eeb0693eda026fa509a9decfbdd7e0b74a8 (diff) | |
download | podman-9c81b8cf7219e7e7507e41e867295ff158028a0a.tar.gz podman-9c81b8cf7219e7e7507e41e867295ff158028a0a.tar.bz2 podman-9c81b8cf7219e7e7507e41e867295ff158028a0a.zip |
add correct slirp ip to /etc/hosts
The container name should have the slirp interface ip set in /etc/hosts
and not the gateway ip. Commit c8dfcce6db0a introduced this regression.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1972073
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index ddfccb999..564c81373 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1816,7 +1816,7 @@ func (c *Container) getHosts() string { if c.Hostname() != "" { if c.config.NetMode.IsSlirp4netns() { // When using slirp4netns, the interface gets a static IP - slirp4netnsIP, err := GetSlirp4netnsGateway(c.slirp4netnsSubnet) + slirp4netnsIP, err := GetSlirp4netnsIP(c.slirp4netnsSubnet) if err != nil { logrus.Warn("failed to determine slirp4netnsIP: ", err.Error()) } else { |