diff options
-rw-r--r-- | libpod/container_internal_common.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libpod/container_internal_common.go b/libpod/container_internal_common.go index f9c1ea12e..d3e37802f 100644 --- a/libpod/container_internal_common.go +++ b/libpod/container_internal_common.go @@ -1313,15 +1313,8 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti } // We want to have the same network namespace as before. - if c.config.CreateNetNS { - netNSPath := "" - if !c.config.PostConfigureNetNS { - netNSPath = c.state.NetNS.Path() - } - - if err := g.AddOrReplaceLinuxNamespace(string(spec.NetworkNamespace), netNSPath); err != nil { - return nil, 0, err - } + if err := c.addNetworkNamespace(&g); err != nil { + return nil, 0, err } if options.Pod != "" { |