Skip to contentSkip to conversation

SUNRPC: Use new rpcb_register_v3() interface in svc_register()

PATCH New Chuck Lever 1 participant 1 message Jan 8, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 SUNRPC: Use new rpcb_register_v3() interface in svc_register()

In order to advertise NFS-related services on IPv6 interfaces via rpcbind, the Linux RPC server implementation has to call the new rpcb_register_v3() interface.

---

 include/linux/sunrpc/svc.h |    3 +-
 net/sunrpc/svc.c           |   85 ++++++++++++++++++++++++++++++++++----------
 net/sunrpc/svcsock.c       |    3 +-
 3 files changed, 69 insertions(+), 22 deletions(-)
include/linux/sunrpc/svc.h +2 -1
index 4f73a0d..35d2481 100644
@@ -390,7 +390,8 @@ struct svc_serv *  svc_create_pooled(struct svc_program *, unsigned int,
 int		   svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
 void		   svc_destroy(struct svc_serv *);
 int		   svc_process(struct svc_rqst *);
-int		   svc_register(struct svc_serv *, int, unsigned short);
+int		   svc_register(struct svc_serv *serv, unsigned short family,
+				unsigned short protocol, unsigned short port);
 void		   svc_unregister(struct svc_serv *serv);
 void		   svc_wake_up(struct svc_serv *);
 void		   svc_reserve(struct svc_rqst *rqstp, int space);
net/sunrpc/svc.c +66 -19

105 lines not on this page · raw message

net/sunrpc/svcsock.c +1 -2
index c75bffe..b49a412 100644
@@ -1641,9 +1641,8 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
 
 	inet = sock->sk;
 
-	/* Register socket with portmapper */
 	if (*errp >= 0 && pmap_register)
-		*errp = svc_register(serv, inet->sk_protocol,
+		*errp = svc_register(serv, inet->sk_family, inet->sk_protocol,
 				     ntohs(inet_sk(inet)->sport));
 
 	if (*errp < 0) {