summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-12-11 16:53:12 -0500
committerMatthew Heon <mheon@redhat.com>2018-12-11 16:56:11 -0500
commitaa9507054d820a2a2999538c04057d8100c15c55 (patch)
tree476bb1757561e8d33eb9e663fc59eed92a6b8085 /libpod/container.go
parent878301f79db4483697eec2ab2563a0a9d465b26b (diff)
downloadpodman-aa9507054d820a2a2999538c04057d8100c15c55.tar.gz
podman-aa9507054d820a2a2999538c04057d8100c15c55.tar.bz2
podman-aa9507054d820a2a2999538c04057d8100c15c55.zip
Containers sharing a netns should share resolv/hosts
When sharing a network namespace, containers should also share resolv.conf and /etc/hosts in case a container process made changes to either (for example, if I set up a VPN client in container A and join container B to its network namespace, I expect container B to use the DNS servers from A to ensure it can see everything on the VPN). Resolves: #1546 Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go
index b5346e581..18d867f41 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -1003,7 +1003,7 @@ func (c *Container) IsReadOnly() bool {
// NetworkDisabled returns whether the container is running with a disabled network
func (c *Container) NetworkDisabled() (bool, error) {
if c.config.NetNsCtr != "" {
- container, err := c.runtime.LookupContainer(c.config.NetNsCtr)
+ container, err := c.runtime.state.Container(c.config.NetNsCtr)
if err != nil {
return false, err
}