]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r324639
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 5 Nov 2017 20:28:28 +0000 (20:28 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 5 Nov 2017 20:28:28 +0000 (20:28 +0000)
commit2cfa823b02212c4f7242bd8a238d87ef07bdaffb
treea5e2fa7e25ba3d173279ae0beb6d6b3566d70579
parent831c916cc34f3a2547a21a255989c52dcb321778
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@325448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsserver/nfs_nfsdserv.c
sys/fs/nfsserver/nfs_nfsdstate.c