summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-06-15 13:26:02 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-06-15 13:41:14 +0200
commit9c81b8cf7219e7e7507e41e867295ff158028a0a (patch)
treeaa8793d31a9dbdb9dfdf0f16c08f00500cc44314 /libpod
parente2f51eeb0693eda026fa509a9decfbdd7e0b74a8 (diff)
downloadpodman-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')
-rw-r--r--libpod/container_internal_linux.go2
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 {