- uint32_t unshare_mask;
- /* 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);
- }
+ uint32_t unshare_flags;
+
+ /* Unshare the net namespace if requested in the slice config */
+ unshare_flags = unshare_netns ? CLONE_NEWNET : 0;
+
+ if (unshare_flags != 0) {
+ unshare_flags |=vc_get_space_mask();
+ //printf("vc_enter_namespace(%d, %X)\n", ctx, unshare_flags);
+ //vc_enter_namespace(ctx, unshare_flags);
+ }