summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/rpc_generic.c4
-rw-r--r--sys/rpc/svc_vc.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c
index 4643bf5..28aa849 100644
--- a/sys/rpc/rpc_generic.c
+++ b/sys/rpc/rpc_generic.c
@@ -703,7 +703,9 @@ __rpc_sockisbound(struct socket *so)
struct sockaddr *sa;
int error, bound;
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (0);
@@ -791,7 +793,9 @@ bindresvport(struct socket *so, struct sockaddr *sa)
socklen_t salen;
if (sa == NULL) {
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (error);
freesa = TRUE;
diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c
index fb40a34..be8e04e 100644
--- a/sys/rpc/svc_vc.c
+++ b/sys/rpc/svc_vc.c
@@ -150,7 +150,9 @@ svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
SOCK_LOCK(so);
if (so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED)) {
SOCK_UNLOCK(so);
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
return (NULL);
xprt = svc_vc_create_conn(pool, so, sa);
@@ -167,7 +169,9 @@ svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
xprt->xp_p2 = NULL;
xprt->xp_ops = &svc_vc_rendezvous_ops;
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error) {
goto cleanup_svc_vc_create;
}
@@ -249,7 +253,9 @@ svc_vc_create_conn(SVCPOOL *pool, struct socket *so, struct sockaddr *raddr)
memcpy(&xprt->xp_rtaddr, raddr, raddr->sa_len);
+ CURVNET_SET(so->so_vnet);
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
+ CURVNET_RESTORE();
if (error)
goto cleanup_svc_vc_create;
OpenPOWER on IntegriCloud