Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2019 17:56:07 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        "freebsd-current@FreeBSD.org" <freebsd-current@freebsd.org>
Subject:   Re: what do jails map 127.0.0.1 to?
Message-ID:  <CAOtMX2hmxJEhHvqUngk%2BVA4KBH8jkbJW2NMGpua4ci1VrRzjkQ@mail.gmail.com>
In-Reply-To: <QB1PR01MB3537028815A3502AA6BC4B9BDD640@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>
References:  <QB1PR01MB3537028815A3502AA6BC4B9BDD640@QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 10, 2019 at 5:51 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
>
> I am finally back to looking at an old PR#205193.
>
> The problem is that the nfsuserd daemon expects upcalls from the kernel
> that are from localhost (127.0.0.1) and when jails are running on the system,
> 127.0.0.1 is mapped to some other IP#. (I think it might be the address of the
> first net interface on the machine, but I'm not sure?)
>
> Is there a way that nfsuserd.c can find out what this IP# is?
> (I have a patch that converts nfsuserd.c to using an AF_LOCAL socket, but that
>  breaks for some setups. I think it was when the directory the socket was being
>  created in is NFSv4 mounted, but I can't remember exactly how it fails.)
>
> Thanks for any help with this, rick

The easy way would be for nfsuserd to bind a socket to 127.0.0.1, then
use getsockname(2) to see what actual address it got bound to.
-Alan



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