rdomain related interface configuration via hostname.if(5) broken in current

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

rdomain related interface configuration via hostname.if(5) broken in current

Andreas Bartelt-2
configuration of IP addresses via hostname.if(5) is currently broken for
lo(4) in case it's an auto-created interface in the context of rdomain
usage (i.e., putting em0 in rdomain 1 auto-creates lo1). The problem
persists at least since Feb, 23rd and can be worked around by simply
configuring an IP address for lo1 via ifconfig command in /etc/rc.local

Example:

# cat /etc/hostname.em0
rdomain 1
dhcp

# cat /etc/hostname.lo1
inet 192.168.1.1 255.255.255.0 NONE

This kind of config previously worked well in the following way:
- rdomain 1 was created
- em0 was put into rdomain 1
- lo1 was auto-created and put into rdomain 1
- /etc/hostname.lo1 added an IP address to the lo1 interface (which
remained in rdomain 1)

Since the breakage, this config fails to create rdomain 1. Adding a
(previously redundant) "rdomain 1" statement to /etc/hostname.lo1 also
doesn't solve the problem.

Please let me know if you need further infos on my specific config.

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Jiri B-2
On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
> Please let me know if you need further infos on my specific config.

I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018):

/etc/hostname.vether20

rdomain 20
inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain" group onion
!ifconfig lo20 inet 127.0.0.1/8
!route -T20 -qn add -net 127 127.0.0.1 -reject
!route -T20 -qn add default 172.16.20.1

j.

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Andreas Bartelt-2
On 03/01/18 09:07, Jiri B wrote:

> On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
>> Please let me know if you need further infos on my specific config.
>
> I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018):
>
> /etc/hostname.vether20
>
> rdomain 20
> inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain" group onion
> !ifconfig lo20 inet 127.0.0.1/8
> !route -T20 -qn add -net 127 127.0.0.1 -reject
> !route -T20 -qn add default 172.16.20.1
>

thanks -- your variant for setting an IP address for lo(4) in the
underlying interface's rdomain is less evil than delaying the ifconfig
statement until /etc/rc.local is run. Your variant also still works on
current.

Nevertheless, I suppose there was nothing inherently wrong with my
previous approach to configuring an IP address for loX via
/etc/hostname.loX which is now broken on current. Or is there a good
reason I'm not aware of that this variant doesn't work anymore?

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Sebastian Benoit-3
Andreas Bartelt([hidden email]) on 2018.03.01 19:18:29 +0100:

> On 03/01/18 09:07, Jiri B wrote:
> >On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
> >>Please let me know if you need further infos on my specific config.
> >
> >I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST
> >2018):
> >
> >/etc/hostname.vether20
> >
> >rdomain 20
> >inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain"
> >group onion
> >!ifconfig lo20 inet 127.0.0.1/8
> >!route -T20 -qn add -net 127 127.0.0.1 -reject
> >!route -T20 -qn add default 172.16.20.1
> >
>
> thanks -- your variant for setting an IP address for lo(4) in the
> underlying interface's rdomain is less evil than delaying the ifconfig
> statement until /etc/rc.local is run. Your variant also still works on
> current.
>
> Nevertheless, I suppose there was nothing inherently wrong with my
> previous approach to configuring an IP address for loX via
> /etc/hostname.loX which is now broken on current. Or is there a good
> reason I'm not aware of that this variant doesn't work anymore?

Thanks for your report.

There was a change on how rdomains an lo devices interact.
We have to decide if this is just a documentation problem
or should be solved differently.

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Claudio Jeker-3
In reply to this post by Andreas Bartelt-2
On Thu, Mar 01, 2018 at 07:18:29PM +0100, Andreas Bartelt wrote:

> On 03/01/18 09:07, Jiri B wrote:
> >On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
> >>Please let me know if you need further infos on my specific config.
> >
> >I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018):
> >
> >/etc/hostname.vether20
> >
> >rdomain 20
> >inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain" group onion
> >!ifconfig lo20 inet 127.0.0.1/8
> >!route -T20 -qn add -net 127 127.0.0.1 -reject
> >!route -T20 -qn add default 172.16.20.1
> >
>
> thanks -- your variant for setting an IP address for lo(4) in the underlying
> interface's rdomain is less evil than delaying the ifconfig statement until
> /etc/rc.local is run. Your variant also still works on current.
>
> Nevertheless, I suppose there was nothing inherently wrong with my previous
> approach to configuring an IP address for loX via /etc/hostname.loX which is
> now broken on current. Or is there a good reason I'm not aware of that this
> variant doesn't work anymore?
>

I will revert the changes to automatically configure the lo interfaces in
-current. That should get us back to where it was before. Still I think
rdomains should automatically have a 127.0.0.1 and ::1 IP configured just
need to figure out how to do this properly.

--
:wq Claudio

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Claudio Jeker-3
On Fri, Mar 02, 2018 at 07:22:05AM +0100, Claudio Jeker wrote:

> On Thu, Mar 01, 2018 at 07:18:29PM +0100, Andreas Bartelt wrote:
> > On 03/01/18 09:07, Jiri B wrote:
> > >On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
> > >>Please let me know if you need further infos on my specific config.
> > >
> > >I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018):
> > >
> > >/etc/hostname.vether20
> > >
> > >rdomain 20
> > >inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain" group onion
> > >!ifconfig lo20 inet 127.0.0.1/8
> > >!route -T20 -qn add -net 127 127.0.0.1 -reject
> > >!route -T20 -qn add default 172.16.20.1
> > >
> >
> > thanks -- your variant for setting an IP address for lo(4) in the underlying
> > interface's rdomain is less evil than delaying the ifconfig statement until
> > /etc/rc.local is run. Your variant also still works on current.
> >
> > Nevertheless, I suppose there was nothing inherently wrong with my previous
> > approach to configuring an IP address for loX via /etc/hostname.loX which is
> > now broken on current. Or is there a good reason I'm not aware of that this
> > variant doesn't work anymore?
> >
>
> I will revert the changes to automatically configure the lo interfaces in
> -current. That should get us back to where it was before. Still I think
> rdomains should automatically have a 127.0.0.1 and ::1 IP configured just
> need to figure out how to do this properly.
>

Atfer some more thinking I think this has nothing todo with my reverted
diff. The problem is actually the new netstart and the way interfaces are
now configured. Before hostname.lo1 was run (and created) after em0 was
configured which was adding rdomain 1. Now lo(4) is considered a cloning
interface and ifconfig lo1 create is run very early on. Because of
this creation of rdomain 1 fails and so the config fails.

--
:wq Claudio

Reply | Threaded
Open this post in threaded view
|

Re: rdomain related interface configuration via hostname.if(5) broken in current

Andreas Bartelt-2
On 03/03/18 13:59, Claudio Jeker wrote:

> On Fri, Mar 02, 2018 at 07:22:05AM +0100, Claudio Jeker wrote:
>> On Thu, Mar 01, 2018 at 07:18:29PM +0100, Andreas Bartelt wrote:
>>> On 03/01/18 09:07, Jiri B wrote:
>>>> On Thu, Mar 01, 2018 at 08:37:38AM +0100, Andreas Bartelt wrote:
>>>>> Please let me know if you need further infos on my specific config.
>>>>
>>>> I use this (OpenBSD 6.2-current (GENERIC.MP) #6: Tue Feb 13 20:16:11 MST 2018):
>>>>
>>>> /etc/hostname.vether20
>>>>
>>>> rdomain 20
>>>> inet 172.16.20.2 255.255.255.0 172.16.20.255 description "archive rdomain" group onion
>>>> !ifconfig lo20 inet 127.0.0.1/8
>>>> !route -T20 -qn add -net 127 127.0.0.1 -reject
>>>> !route -T20 -qn add default 172.16.20.1
>>>>
>>>
>>> thanks -- your variant for setting an IP address for lo(4) in the underlying
>>> interface's rdomain is less evil than delaying the ifconfig statement until
>>> /etc/rc.local is run. Your variant also still works on current.
>>>
>>> Nevertheless, I suppose there was nothing inherently wrong with my previous
>>> approach to configuring an IP address for loX via /etc/hostname.loX which is
>>> now broken on current. Or is there a good reason I'm not aware of that this
>>> variant doesn't work anymore?
>>>
>>
>> I will revert the changes to automatically configure the lo interfaces in
>> -current. That should get us back to where it was before. Still I think
>> rdomains should automatically have a 127.0.0.1 and ::1 IP configured just
>> need to figure out how to do this properly.
>>
>
> Atfer some more thinking I think this has nothing todo with my reverted
> diff. The problem is actually the new netstart and the way interfaces are
> now configured. Before hostname.lo1 was run (and created) after em0 was
> configured which was adding rdomain 1. Now lo(4) is considered a cloning
> interface and ifconfig lo1 create is run very early on. Because of
> this creation of rdomain 1 fails and so the config fails.
>

I can confirm that the /etc/hostname.lo1 config variant from my original
mail also doesn't work with yesterday's build which included your
reverted patch with regard to 127.0.0.1 autocreate. However, behavior
seems to have slightly changed since rdomain 1 is actually created now
and lo1 also is inside rdomain 1. However, the underlying interface is
not inside rdomain 1 (although it's hostname.if(5) contains a rdomain 1
statement).