diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-06-15 13:26:02 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-06-24 14:00:23 -0400 |
commit | 1c04cfe8376640f328179531ac46cb523958d84a (patch) | |
tree | 2ab5b6b4ddf3b558200881a2ab67185f86ad1380 /libpod | |
parent | 6c4ee8535f587f5fd237c2f4a58132ddd2894c84 (diff) | |
download | podman-1c04cfe8376640f328179531ac46cb523958d84a.tar.gz podman-1c04cfe8376640f328179531ac46cb523958d84a.tar.bz2 podman-1c04cfe8376640f328179531ac46cb523958d84a.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')
-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 5f6493743..30eb36cd6 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1818,7 +1818,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 { |