Re: vport: set UP on ip assign

2021-11-24 Thread Stuart Henderson
How about a flag that can be passed via ifconfig to disable the implicit up? Then netstart could use it to enaure that an interface is only brought up after it has finished configuration (which *is* a problem for pppoe and carp at least) and it suits people's finger memory for ifconfig? Of course

Re: vport: set UP on ip assign

2021-11-23 Thread Theo de Raadt
Klemens Nanni wrote: > Then, finally, interfaces only go UP if users do `ifconfig ... up' > or hostname.* contain the word "up". Otherwise they stay DOWN. > > This would be a dead simple thing to reason. Yeah it is so reasonable in fact why don't we add a chunk to the top of netstart to force

Re: vport: set UP on ip assign

2021-11-23 Thread Theo de Raadt
And here is the root of the argument -- where it is all going towards. > If we decide to handle this in netstart alone, shouldn't all interfaces > behave like vport(4) and not mess with their state unless explicitly > requested to do so? the implication here, is let's go change all the drivers

Re: vport: set UP on ip assign

2021-11-23 Thread Klemens Nanni
On Wed, Nov 24, 2021 at 02:30:08AM +0100, Klemens Nanni wrote: > On Tue, Nov 16, 2021 at 09:22:26AM +1000, David Gwynne wrote: > > On Mon, Nov 15, 2021 at 02:31:42PM +, Klemens Nanni wrote: > > > On Mon, Nov 15, 2021 at 01:37:49PM +, Stuart Henderson wrote: > > > > On 2021/11/15 12:27,

Re: vport: set UP on ip assign

2021-11-23 Thread Klemens Nanni
On Tue, Nov 16, 2021 at 09:22:26AM +1000, David Gwynne wrote: > On Mon, Nov 15, 2021 at 02:31:42PM +, Klemens Nanni wrote: > > On Mon, Nov 15, 2021 at 01:37:49PM +, Stuart Henderson wrote: > > > On 2021/11/15 12:27, Klemens Nanni wrote: > > > > On Sun, Nov 14, 2021 at 07:04:42PM -0700,

Re: vport: set UP on ip assign

2021-11-15 Thread Klemens Nanni
On Mon, Nov 15, 2021 at 04:25:54PM -0700, Theo de Raadt wrote: > > + _cmds[${#_cmds[*]}]="ifconfig $_if $_ifup" > > I will be surprised if you can simply add "up" to potential > ifconfig commandlines. This does not amend "ifconfig foo0 bar ..." to ifconfig foo0 bar ... up" if that's what

Re: vport: set UP on ip assign

2021-11-15 Thread Theo de Raadt
> + _cmds[${#_cmds[*]}]="ifconfig $_if $_ifup" I will be surprised if you can simply add "up" to potential ifconfig commandlines.

Re: vport: set UP on ip assign

2021-11-15 Thread David Gwynne
On Mon, Nov 15, 2021 at 02:31:42PM +, Klemens Nanni wrote: > On Mon, Nov 15, 2021 at 01:37:49PM +, Stuart Henderson wrote: > > On 2021/11/15 12:27, Klemens Nanni wrote: > > > On Sun, Nov 14, 2021 at 07:04:42PM -0700, Theo de Raadt wrote: > > > > I think physical interfaces should come up

Re: [EXTERNAL] Re: vport: set UP on ip assign

2021-11-15 Thread Theo de Raadt
Eichert, Diana wrote: > As a person who has spent a lot of time configuring network devices it > seems normal to explicitly bring an interface UP, whatever type of > interface. Some commercial routers and switches have explicit up operations. Others follow a change-and-commit model. But

Re: vport: set UP on ip assign

2021-11-15 Thread Klemens Nanni
On Mon, Nov 15, 2021 at 01:37:49PM +, Stuart Henderson wrote: > On 2021/11/15 12:27, Klemens Nanni wrote: > > On Sun, Nov 14, 2021 at 07:04:42PM -0700, Theo de Raadt wrote: > > > I think physical interfaces should come up when something is configured > > > on them, but virtual interfaces

Re: vport: set UP on ip assign

2021-11-15 Thread Stuart Henderson
On 2021/11/15 12:27, Klemens Nanni wrote: > On Sun, Nov 14, 2021 at 07:04:42PM -0700, Theo de Raadt wrote: > > I think physical interfaces should come up when something is configured > > on them, but virtual interfaces shouldn't -- mostly because the order of > > configuration is often muddled. >

Re: vport: set UP on ip assign

2021-11-15 Thread Peter Hessler
On 2021 Nov 15 (Mon) at 13:58:08 +0100 (+0100), Claudio Jeker wrote: :On Mon, Nov 15, 2021 at 12:23:02PM +, Klemens Nanni wrote: ... :Sure people got used to this mode. I agree with dlg@ that the way that :this auto interface up happens is rather horrible from a network stack :view. Also it

Re: vport: set UP on ip assign

2021-11-15 Thread Claudio Jeker
On Mon, Nov 15, 2021 at 12:23:02PM +, Klemens Nanni wrote: > On Mon, Nov 15, 2021 at 12:00:18PM +1000, David Gwynne wrote: > > On Sat, Nov 13, 2021 at 11:59:59PM +, Klemens Nanni wrote: > > > Practically all interfaces pull itself up when IPs get assigned, but > > > vport(4) does not. > >

Re: vport: set UP on ip assign

2021-11-15 Thread Klemens Nanni
On Sun, Nov 14, 2021 at 07:04:42PM -0700, Theo de Raadt wrote: > I think physical interfaces should come up when something is configured > on them, but virtual interfaces shouldn't -- mostly because the order of > configuration is often muddled. So "inet6 2001:db8::1" in hostname.em0 will do the

Re: vport: set UP on ip assign

2021-11-15 Thread Klemens Nanni
On Mon, Nov 15, 2021 at 12:00:18PM +1000, David Gwynne wrote: > On Sat, Nov 13, 2021 at 11:59:59PM +, Klemens Nanni wrote: > > Practically all interfaces pull itself up when IPs get assigned, but > > vport(4) does not. > > Yes, I do (or don't do) this very deliberately when I get the chance.

Re: vport: set UP on ip assign

2021-11-14 Thread Theo de Raadt
I think physical interfaces should come up when something is configured on them, but virtual interfaces shouldn't -- mostly because the order of configuration is often muddled. David Gwynne wrote: > On Sat, Nov 13, 2021 at 11:59:59PM +, Klemens Nanni wrote: > > Practically all interfaces

Re: vport: set UP on ip assign

2021-11-14 Thread David Gwynne
On Sat, Nov 13, 2021 at 11:59:59PM +, Klemens Nanni wrote: > Practically all interfaces pull itself up when IPs get assigned, but > vport(4) does not. Yes, I do (or don't do) this very deliberately when I get the chance. > This broke IPv4 networking for me on a router I switched from

vport: set UP on ip assign

2021-11-13 Thread Klemens Nanni
Practically all interfaces pull itself up when IPs get assigned, but vport(4) does not. This broke IPv4 networking for me on a router I switched from bridge(4) to veb(4) because hostname.vport0 only contained the equivalent of descr LAN inet 192.0.2.1 inet6 2001:db8::1