From: Aime Le Rouzic Date: Tue, 26 Jan 2010 19:03:56 +0000 (-0500) Subject: NFSD: Support AF_INET6 in svc_addsock() function X-Git-Tag: v2.6.34-rc1~27^2~16 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=205ba42308729f4f41f21d314a4435e7de5c9a2e;p=karo-tx-linux.git 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 Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- 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)