summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-08-27 14:35:45 +0100
committerDoug Rabson <dfr@rabson.org>2022-09-05 10:17:49 +0100
commita148c16225241aaf25a36980973f8e4bcf08a647 (patch)
tree6b2cdeb6479fb9c4e437406ea112c5b50b4b1709
parent7518a9136aaa95ed078a876c015675e8a977caf7 (diff)
downloadpodman-a148c16225241aaf25a36980973f8e4bcf08a647.tar.gz
podman-a148c16225241aaf25a36980973f8e4bcf08a647.tar.bz2
podman-a148c16225241aaf25a36980973f8e4bcf08a647.zip
libpod: Use (*Container).addNetworkNamespace to restore checkpoint network
[NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
-rw-r--r--libpod/container_internal_common.go11
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 != "" {