SUNRPC: Pass a family argument to svc_register()
The sv_family field is going away. Instead of using sv_family, have the svc_register() function take a protocol family argument. Since this argument represents a protocol family, and not an address family, this argument takes an int, as this is what is passed to sock_create_kern(). Also make sure svc_register's helpers are checking for PF_FOO instead of AF_FOO. The value of [AP]F_FOO are equivalent; this is simply a symbolic change to reflect the semantics of the value stored in that variable. sock_create_kern() should return EPFNOSUPPORT if the passed-in protocol family isn't supported, but it uses EAFNOSUPPORT for this case. We will stick with that tradition here, as svc_register() is called by the RPC server in the same path as sock_create_kern(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
156e62094a
commit
4b62e58ccc
3 changed files with 14 additions and 13 deletions
|
@ -1122,7 +1122,7 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
|
|||
|
||||
/* Register socket with portmapper */
|
||||
if (*errp >= 0 && pmap_register)
|
||||
*errp = svc_register(serv, inet->sk_protocol,
|
||||
*errp = svc_register(serv, serv->sv_family, inet->sk_protocol,
|
||||
ntohs(inet_sk(inet)->sport));
|
||||
|
||||
if (*errp < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue