struct vc_net_flags vc_nf;
/* Create network context */
- if (vc_net_create(ctx) == VC_NOCTX)
+ if (vc_net_create(ctx) == VC_NOCTX) {
+ if (errno == EEXIST)
+ goto process;
return -1;
+ }
/* Make the network context persistent */
vc_nf.mask = vc_nf.flagword = VC_NXF_PERSISTENT;
if (vc_set_nflags(ctx, &vc_nf))
return -1;
- /* XXX: Allow access to all IPv4 addresses (for now) */
- vc_net.type = vcNET_IPV4;
- vc_net.count = 1;
- vc_net.ip[0] = 0;
- vc_net.mask[0] = 0;
- if (vc_net_add(ctx, &vc_net) == -1)
- return -1;
-
+process:
/*
* Create context info - this sets the STATE_SETUP and STATE_INIT flags.
*/
return -1;
/* context doesn't exist - create it */
- if (create_context(ctx, bcaps,slr))
+ if (create_context(ctx, bcaps, slr))
{
if (errno == EEXIST)
/* another process beat us in a race */
{"rlimits/openfd.soft", &slr->vs_openfd.soft},
{"rlimits/openfd.min", &slr->vs_openfd.min},
- {"whitelisted", &slr->vs_whitelisted},
-
{"bcapabilities", NULL},
{0,0}
};
slr->vs_openfd.soft = VC_LIM_KEEP;
slr->vs_openfd.min = VC_LIM_KEEP;
- slr->vs_whitelisted = 1;
-
slr->vs_capabilities.bcaps = 0;
slr->vs_capabilities.bmask = 0;
slr->vs_capabilities.ccaps = 0;