Date: Thu, 28 Feb 2019 18:15:39 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: rmacklem@uoguelph.ca Cc: freebsd-net@freebsd.org Subject: Re: correct IP# for NFS kernel upcall to userland daemon Message-ID: <20190228.181539.867694221978174531.hrs@allbsd.org> In-Reply-To: <QB1PR01MB35370C0E73521F76C2A87B62DD630@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM> References: <QB1PR01MB35370C0E73521F76C2A87B62DD630@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Thu_Feb_28_18_15_39_2019_501)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Rick Macklem <rmacklem@uoguelph.ca> wrote in <QB1PR01MB35370C0E73521F76C2A87B62DD630@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 ----Security_Multipart(Thu_Feb_28_18_15_39_2019_501)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iEYEABECAAYFAlx3prsACgkQTyzT2CeTzy3/TQCdHxGWCJDzdx3K0BoUzGM71i4C 4ykAn1GpO3CJTBAYdA1ZA9E45y2Caafk =Tqxt -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Feb_28_18_15_39_2019_501)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190228.181539.867694221978174531.hrs>