]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Try to make sure that clientid used for NFSv4 is reliable.
authorNeil Brown <neilb@suse.de>
Fri, 23 Jun 2006 03:37:08 +0000 (13:37 +1000)
committerNeil Brown <neilb@suse.de>
Fri, 23 Jun 2006 03:37:08 +0000 (13:37 +1000)
We need to give an IP address to identify this client to the
server.
The current code does a gethostbyname of the hostname. One
some systems this returns 127.0.0.1 or similar, which is not useful.

Instead, use getsockname of the sock used to connect to the server
to confirm that the server is working.  This gives the address on the
interface that was chosen to talk to that server, which is the
best address we can find (if there is a NAT in the way, it might
still not work, but in that case there is nothing we can do).


No differences found