summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-02-12 08:53:29 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 17:48:35 (GMT)
commit482fb94e1b0c2efe8258334aa2a68d4f4a91de9c (patch)
tree84353b34bb5ea02df98b598fff037cf1da20d6b0 /net/sunrpc
parent6b174337e5126de834a971d3edc3681bbfa45e2c (diff)
downloadlinux-fsl-qoriq-482fb94e1b0c2efe8258334aa2a68d4f4a91de9c.tar.xz
[PATCH] knfsd: SUNRPC: allow creating an RPC service without registering with portmapper
Sometimes we need to create an RPC service but not register it with the local portmapper. NFSv4 delegation callback, for example. Change the svc_makesock() API to allow optionally creating temporary or permanent sockets, optionally registering with the local portmapper, and make it return the ephemeral port of the new socket. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svcsock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 27ba34a..d120fad 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1689,9 +1689,11 @@ void svc_close_socket(struct svc_sock *svsk)
* @serv: RPC server structure
* @protocol: transport protocol to use
* @port: port to use
+ * @flags: requested socket characteristics
*
*/
-int svc_makesock(struct svc_serv *serv, int protocol, unsigned short port)
+int svc_makesock(struct svc_serv *serv, int protocol, unsigned short port,
+ int flags)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
@@ -1700,7 +1702,7 @@ int svc_makesock(struct svc_serv *serv, int protocol, unsigned short port)
};
dprintk("svc: creating socket proto = %d\n", protocol);
- return svc_create_socket(serv, protocol, &sin, SVC_SOCK_DEFAULTS);
+ return svc_create_socket(serv, protocol, &sin, flags);
}
/*