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
[-- Attachment #1 --] On Mon, May 22, 2023 at 12:53 PM Alexander Chernikov <melifaro@freebsd.org> wrote: > > My main question here is the desired ownership model. I don’t have 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’t 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’m not sure SIOCSIFADDR should be (ab)used by the drivers ioctls(). > That model dates back to BSD 4.4 and doesn’t look well in presence 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’s 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 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:"courier new",monospace"><span style="font-family:Arial,Helvetica,sans-serif">On Mon, May 22, 2023 at 12:53 PM Alexander Chernikov <<a href="mailto:melifaro@freebsd.org">melifaro@freebsd.org</a>> wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> My main question here is the desired ownership model. I don’t 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 userland or both created by the kernel)<br> 2) the process should be independent (e.g. adding address from one family shouldn’t result in adding address from the other family).<br> For example, it can be either userland explicitly creates both or the kernel creates both on interface up, using protocol hooks).<br> 3) I’m not sure SIOCSIFADDR should be (ab)used by the drivers ioctls(). That model dates back to BSD 4.4 and doesn’t look well in presence of event handlers.<br> Most drivers (default ethernet handler, loop, gre,disc,me,ipsec) just set IFF_UP there.<br> <br> More than happy to hear what other’s think on the issue(s)<br><br></blockquote><div><br></div><div class="gmail_default" style="font-family:"courier new",monospace"><br></div><div class="gmail_default" style="font-family:"courier new",monospace">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.<br>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.<br></div><div class="gmail_default" style="font-family:"courier new",monospace">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 :-)</div><div class="gmail_default" style="font-family:"courier new",monospace"><br></div><div class="gmail_default" style="font-family:"courier new",monospace">Regards,</div><div class="gmail_default" style="font-family:"courier new",monospace">Olivier</div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bq%2BTcqdbK1EWAPfZ1aMDq-FOjGOqXtTLLCBg6i8rKwVKw-vpw>
