]> git.decadent.org.uk Git - nfs-utils.git/commit
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)
commitc2db41e8abb6ddc9d03a0c91c6db043fa0f85a8f
tree5ba4131cda3ac7353a4acbbcdcdd02eb8c618c3c
parent11d34d11153df198103a57291937ea9ff8b7356e
Try to make sure that clientid used for NFSv4 is reliable.

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).
support/include/conn.h
support/nfs/conn.c
utils/mount/nfs4mount.c
utils/mount/nfsmount.c