]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC: r324639
authorrmacklem <rmacklem@FreeBSD.org>
Thu, 2 Nov 2017 20:28:53 +0000 (20:28 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Thu, 2 Nov 2017 20:28:53 +0000 (20:28 +0000)
commit209204282f776c3cdb3f6096b6a9cb83680a51f7
tree690a40f961f455eebe4cf758dcd9cfebec6e59a3
parenta88f0513c4cf81f98bab740e4f112f1a6d7f4d42
MFC: r324639
Fix the client IP address reported by nfsdumpstate for 64bit arch and NFSv4.1.

The client IP address was not being reported for some NFSv4 mounts by
nfsdumpstate. Upon investigation, two problems were found for mounts
using IPv4. One was that the code (originally written and tested on i386)
assumed that a "u_long" was a "uint32_t" and would exactly store an
IPv4 host address. Not correct for 64bit arches.
Also, for NFSv4.1 mounts, the field was not being filled in. This was
basically correct, because NFSv4.1 does not use a callback address.
However, it meant that nfsdumpstate could not report the client IP addr.
This patch should fix both of these issues.
For IPv6, the address will still not be reported. The original NFSv4 RFC
only specified IPv4 callback addresses. I think this has changed and, if so,
a future commit to fix reporting of IPv6 addresses will be needed.
sys/fs/nfsserver/nfs_nfsdserv.c
sys/fs/nfsserver/nfs_nfsdstate.c