Call enter_namespace before ctx_migrate.
authorSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 6 Oct 2008 22:42:33 +0000 (22:42 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 6 Oct 2008 22:42:33 +0000 (22:42 +0000)
src/planetlab.c

index 61cb31a..f3256a6 100644 (file)
@@ -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;