From 9e41e9cb64ff294c6d660f3fd5400199b5a22c95 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Mon, 6 Oct 2008 22:42:33 +0000 Subject: [PATCH] Call enter_namespace before ctx_migrate. --- src/planetlab.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/planetlab.c b/src/planetlab.c index 61cb31a..f3256a6 100644 --- a/src/planetlab.c +++ b/src/planetlab.c @@ -188,6 +188,12 @@ pl_chcontext(xid_t ctx, uint64_t bcaps, const struct sliver_resources *slr) migrate: if (net_migrated || !vc_net_migrate(ctx)) { + /* Unshare the net namespace if the slice if requested in the local slice configuration */ + unshare_mask = get_space_flag(ctx); + if (unshare_mask != 0) { + vc_enter_namespace(ctx, unshare_mask); + } + if (!vc_tag_migrate(ctx) && !vc_ctx_migrate(ctx, 0)) break; /* done */ net_migrated = 1; -- 2.43.0