From: Neil Brown Date: Fri, 23 Jun 2006 03:37:08 +0000 (+1000) Subject: Try to make sure that clientid used for NFSv4 is reliable. X-Git-Tag: nfs-utils-1-0-9-pre1~8 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=c2db41e8abb6ddc9d03a0c91c6db043fa0f85a8f;hp=c2db41e8abb6ddc9d03a0c91c6db043fa0f85a8f 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). ---