On Mon, Nov 15, 2021 at 01:37:49PM +0000, 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 shouldn't -- mostly because the order of
> > > configuration is often muddled.
> > 
> > So "inet6 2001:db8::1" in hostname.em0 will do the trick but
> > hostname.vport0 would need another "up" for the same behaviour:  that's
> > rather confusing me as a user.
> 
> hostname.* files are orthogonal to this; netstart can process all the lines,
> then if it has seen a line doing address configuration and has not seen an
> explicit "down", it can bring the interface up automatically at the end.
> (if this changed, it would be a nightmare for users to do anything else).

Yes, netstart can and should deal with this correctly, just like you
describe.

> Users would need to make sure they have a netstart which does that if
> updating a kernel, but that's just a case of matching kernel+userland and is
> nothing new for OpenBSD.
> 
> The different behaviour would be apparent with separate runs of ifconfig.
> some scripts may need adapting and users might need to run "ifconfig XX up"
> themselves but I don't think that would be a problem.

Agreed.

Having the implicit-up logic entirely contained in netstart would make
lifer much easier, both for network stack hackers and users, imho.

Reply via email to