Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)