]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r345994
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 21 Apr 2019 01:25:27 +0000 (01:25 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 21 Apr 2019 01:25:27 +0000 (01:25 +0000)
commit96d93b25a5dbe4ca0c3108c55ec794be4ddf716d
treeb59ef32db42652fe946f3b7c4a427f4564a1a5fb
parenta34ee92841aa268b002020f4ae606024f422c3c2
MFC: r345994
Fix nfsuserd so that it handles the mapped localhost address when jails
are enabled.

The nfsuserd(8) daemon does not function correctly when jails are enabled,
since localhost gets mapped to another IP address and, as such, the upcall
RPC fails.
This patch fixes the problem by doing a getsockname(2) of a socket mapped
to localhost to find out what the correct address is for the comparison
test with the upcall's from IP address.
This patch also adds INET6 support and the required #ifdef's for INET and
INET6. It now uses INET6 by default for the upcalls, if the kernel has
INET6 support and the daemon is also built with INET6 support.

git-svn-id: svn://svn.freebsd.org/base/stable/10@346467 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/nfsuserd/Makefile
usr.sbin/nfsuserd/nfsuserd.c