On Thursday 09 May 2013 19:53:05 Vijay Singh wrote: > In 8.3, socreate() does: > > so = soalloc(CRED_TO_VNET(cred)); > > Is there a reason why we don't do soalloc(curvnet) here? Since > CURVNET_SET() doesn't update the vnet in the thread ucred, which is > passed into socreate(), it doesn't take effect for socket creations.
Because CRED_TO_VNET(cred) and curvnet are fundamentally different things: #define CRED_TO_VNET(cr) (cr)->cr_prison->pr_vnet #define curvnet curthread->td_vnet and moreover at the time soalloc() gets called curvnet is (usually) NULL. Marko _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[email protected]"
