diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2009-08-02 16:59:02 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2009-08-02 16:59:02 +0000 |
| commit | 9734411552a036160bfa03958256bdd3bfe6119f (patch) | |
| tree | b1dc4eb8dc6e0665c941206acb39448f2a5d3f0f | |
| parent | 444b91868b5294e3a2151fffa3b063763a562448 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_uuid.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c index e7e41239f956..5b61ca416ee9 100644 --- a/sys/kern/kern_uuid.c +++ b/sys/kern/kern_uuid.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/socket.h> #include <sys/sysproto.h> #include <sys/systm.h> +#include <sys/jail.h> #include <sys/uuid.h> #include <net/if.h> @@ -93,6 +94,7 @@ uuid_node(uint16_t *node) struct sockaddr_dl *sdl; int i; + CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { /* Walk the address list */ @@ -105,6 +107,7 @@ uuid_node(uint16_t *node) bcopy(LLADDR(sdl), node, UUID_NODE_LEN); IF_ADDR_UNLOCK(ifp); IFNET_RUNLOCK(); + CURVNET_RESTORE(); return; } } @@ -115,6 +118,7 @@ uuid_node(uint16_t *node) for (i = 0; i < (UUID_NODE_LEN>>1); i++) node[i] = (uint16_t)arc4random(); *((uint8_t*)node) |= 0x01; + CURVNET_RESTORE(); } /* |
