summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAime Le Rouzic <aime.le-rouzic@bull.net>2010-01-26 20:03:56 +0100
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-01-26 23:55:56 +0100
commit205ba42308729f4f41f21d314a4435e7de5c9a2e (patch)
tree0b7f9ac0f79e2bb1a53fb06624b987f8640b282b /net
parentSUNRPC: Use rpc_pton() in ip_map_parse() (diff)
downloadlinux-205ba42308729f4f41f21d314a4435e7de5c9a2e.tar.xz
linux-205ba42308729f4f41f21d314a4435e7de5c9a2e.zip
NFSD: Support AF_INET6 in svc_addsock() function
Relax the address family check at the top of svc_addsock() to allow AF_INET6 listener sockets to be specified via /proc/fs/nfsd/portlist. Signed-off-by: Aime Le Rouzic <aime.le-rouzic@bull.net> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svcsock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 870929e08e5d..9e093910c479 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1357,7 +1357,7 @@ int svc_addsock(struct svc_serv *serv, const int fd, char *name_return,
if (!so)
return err;
- if (so->sk->sk_family != AF_INET)
+ if ((so->sk->sk_family != PF_INET) && (so->sk->sk_family != PF_INET6))
err = -EAFNOSUPPORT;
else if (so->sk->sk_protocol != IPPROTO_TCP &&
so->sk->sk_protocol != IPPROTO_UDP)