Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2023 15:43:59 +0200
From:      =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= <olivier@freebsd.org>
To:        Alexander Chernikov <melifaro@freebsd.org>
Cc:        net@freebsd.org
Subject:   Re: ::1/128 and 127.0.0.1 address creation ownership
Message-ID:  <CA%2Bq%2BTcqdbK1EWAPfZ1aMDq-FOjGOqXtTLLCBg6i8rKwVKw-vpw@mail.gmail.com>
In-Reply-To: <6D75034B-6F14-49BE-ACFA-522D39D49490@FreeBSD.org>
References:  <6D75034B-6F14-49BE-ACFA-522D39D49490@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000392dfb05fc4877f6
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, May 22, 2023 at 12:53=E2=80=AFPM Alexander Chernikov <melifaro@free=
bsd.org>
wrote:

>
> My main question here is the desired ownership model. I don=E2=80=99t hav=
e a
> strong opinion on whether the userland of the kernel should own loopback
> creation.
> However, I think that:
> 1) the behaviour should be consistent (either both of them created by the
> userland or both created by the kernel)
> 2) the process should be independent (e.g. adding address from one family
> shouldn=E2=80=99t result in adding address from the other family).
> For example, it can be either userland explicitly creates both or the
> kernel creates both on interface up, using protocol hooks).
> 3) I=E2=80=99m not sure SIOCSIFADDR should be (ab)used by the drivers ioc=
tls().
> That model dates back to BSD 4.4 and doesn=E2=80=99t look well in presenc=
e of event
> handlers.
> Most drivers (default ethernet handler, loop, gre,disc,me,ipsec) just set
> IFF_UP there.
>
> More than happy to hear what other=E2=80=99s think on the issue(s)
>
>

It seems that loopback addresses are optional: I haven't found an RFC
requiring their presence, but I'd like to have more information on this.
So, the ownership of their creation seems to me good from the userland
(i.e.: rc.d): Administrators are free to configure them or not.
I agree with point 1 (consistency) and point 2 (independency), and about
point 3 I have no technical knowledge here, but the work of cleaning up and
making the proposal coherent seems good too :-)

Regards,
Olivier

--000000000000392dfb05fc4877f6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:&quot;courier new&quot;,monospace"><span style=3D"font-family:Aria=
l,Helvetica,sans-serif">On Mon, May 22, 2023 at 12:53=E2=80=AFPM Alexander =
Chernikov &lt;<a href=3D"mailto:melifaro@freebsd.org">melifaro@freebsd.org<=
/a>&gt; wrote:</span><br></div></div><div class=3D"gmail_quote"><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex"><br>
My main question here is the desired ownership model. I don=E2=80=99t have =
a strong opinion on whether the userland of the kernel should own loopback =
creation.<br>
However, I think that:<br>
1) the behaviour should be consistent (either both of them created by the u=
serland or both created by the kernel)<br>
2) the process should be independent (e.g. adding address from one family s=
houldn=E2=80=99t result in adding address from the other family).<br>
For example, it can be either userland explicitly creates both or the kerne=
l creates both on interface up, using protocol hooks).<br>
3) I=E2=80=99m not sure SIOCSIFADDR should be (ab)used by the drivers ioctl=
s(). That model dates back to BSD 4.4 and doesn=E2=80=99t look well in pres=
ence of event handlers.<br>
Most drivers (default ethernet handler, loop, gre,disc,me,ipsec) just set I=
FF_UP there.<br>
<br>
More than happy to hear what other=E2=80=99s think on the issue(s)<br><br><=
/blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:&quot;courier new&quot;,monospace"><br></div><div class=3D"gmail_default"=
 style=3D"font-family:&quot;courier new&quot;,monospace">It seems that loop=
back addresses are optional: I haven&#39;t found an RFC requiring their pre=
sence, but I&#39;d like to have more information on this.<br>So, the owners=
hip of their creation seems to me good from the userland (i.e.: rc.d): Admi=
nistrators are free to configure them or not.<br></div><div class=3D"gmail_=
default" style=3D"font-family:&quot;courier new&quot;,monospace">I agree wi=
th point 1 (consistency) and point 2 (independency), and about point 3 I ha=
ve no technical knowledge here, but the work of cleaning up and making the =
proposal coherent seems good too :-)</div><div class=3D"gmail_default" styl=
e=3D"font-family:&quot;courier new&quot;,monospace"><br></div><div class=3D=
"gmail_default" style=3D"font-family:&quot;courier new&quot;,monospace">Reg=
ards,</div><div class=3D"gmail_default" style=3D"font-family:&quot;courier =
new&quot;,monospace">Olivier</div></div></div>

--000000000000392dfb05fc4877f6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bq%2BTcqdbK1EWAPfZ1aMDq-FOjGOqXtTLLCBg6i8rKwVKw-vpw>