]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
nfs-utils: store the address given in the upcall for later use
authorJeff Layton <jlayton@redhat.com>
Wed, 15 Apr 2009 15:34:51 +0000 (11:34 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 15 Apr 2009 15:34:51 +0000 (11:34 -0400)
The current upcall could be more efficient. We first convert the address
to a hostname, and then later when we set up the RPC client, we do a
hostname lookup to convert it back to an address.

Begin to change this by keeping the address in the clnt_info that we get
out of the upcall. Since a sockaddr has a port field, we can also
eliminate the port from the clnt_info.

Finally, switch to getnameinfo() instead of gethostbyaddr(). We'll need
to use that call anyway when we add support for IPv6.

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>

No differences found