Commit 205ba423 authored by Aime Le Rouzic's avatar Aime Le Rouzic Committed by J. Bruce Fields

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: default avatarAime Le Rouzic <aime.le-rouzic@bull.net>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 07396051
...@@ -1357,7 +1357,7 @@ int svc_addsock(struct svc_serv *serv, const int fd, char *name_return, ...@@ -1357,7 +1357,7 @@ int svc_addsock(struct svc_serv *serv, const int fd, char *name_return,
if (!so) if (!so)
return err; return err;
if (so->sk->sk_family != AF_INET) if ((so->sk->sk_family != PF_INET) && (so->sk->sk_family != PF_INET6))
err = -EAFNOSUPPORT; err = -EAFNOSUPPORT;
else if (so->sk->sk_protocol != IPPROTO_TCP && else if (so->sk->sk_protocol != IPPROTO_TCP &&
so->sk->sk_protocol != IPPROTO_UDP) so->sk->sk_protocol != IPPROTO_UDP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment