Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2019 15:50:14 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   correct IP# for NFS kernel upcall to userland daemon
Message-ID:  <QB1PR01MB35370C0E73521F76C2A87B62DD630@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>

next in thread | raw e-mail | index | archive | help
Hi,

I have been in a recent discussion about what the correct IP address to use=
 for
an upcall from the kernel to the NFS daemon nfsuserd (which maps between
uids<->usernames and gids<->group names).

The code uses UDP for the upcall (I once committed a patch changing that to
an AF_LOCAL socket, but it broke certain sites where the directory the sock=
et
was being created in was NFS mounted).

Currently the code uses a hardwired "127.0.0.1".
Rodney Grimes feels that it would be better to do a name lookup on "localho=
st"
to get the address to use.

In this case, I am concerned that the daemon will not be able to start up u=
nder
conditions where the DNS service isn't yet functional. (This problem can mo=
stly
be avoided by specifying "localhost" in /etc/hosts and configuring the syst=
em to
use that file before DNS, but I still don't like having this dependency on =
DNS for
the daemon starting up.)
Note that the upcall will work for any IP# that refers to the local machine=
 and it
does not need to be the one specified for "localhost" in the DNS.

So, do you think I should do a lookup for "localhost" at daemon startup or =
use
a hardwired "127.0.0.1/::1"?

Thanks in advance for any comments, rick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?QB1PR01MB35370C0E73521F76C2A87B62DD630>