correct IP# for NFS kernel upcall to userland daemon

Hiroki Sato hrs at FreeBSD.org
Thu Feb 28 09:17:03 UTC 2019


Rick Macklem <rmacklem at uoguelph.ca> wrote
  in <QB1PR01MB35370C0E73521F76C2A87B62DD630 at QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>:

rm> In this case, I am concerned that the daemon will not be able to start up under
rm> conditions where the DNS service isn't yet functional. (This problem can mostly
rm> be avoided by specifying "localhost" in /etc/hosts and configuring the system to
rm> use that file before DNS, but I still don't like having this dependency on DNS for
rm> the daemon starting up.)
rm> Note that the upcall will work for any IP# that refers to the local machine and it
rm> does not need to be the one specified for "localhost" in the DNS.
rm>
rm> So, do you think I should do a lookup for "localhost" at daemon startup or use
rm> a hardwired "127.0.0.1/::1"?

 I do not think using INADDR_LOOPBACK or IN6ADDR_LOOPBACK_INIT is
 harmful for this purpose.  A properly configured lo0 should be a
 reasonable assumption.

 However, I still think using a loopback address in AF_INET or
 AF_INET6 for local communication is not a good idea when AF_LOCAL
 works.  A properly configured file system is easier than lo0 in many
 cases.  An unnamed pair of connected sockets which can be created by
 socketpair(2) would be ideal for this purpose, but IIRC there is no
 handy way to send one across kernel and userland...

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20190228/578dcbaf/attachment.sig>


More information about the freebsd-net mailing list