Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Stuart Henderson
On 2022/11/24 14:36, Vitaliy Makkoveev wrote: > On Wed, Nov 23, 2022 at 09:36:28PM -0700, Theo de Raadt wrote: > > Theo de Raadt wrote: > > > > > > The other, that if both exist, > > > > /etc/hostname.$if will override /etc/hostname.$lladdr. > > > > > > We do need to decide which one is

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Vitaliy Makkoveev
On Thu, Nov 24, 2022 at 01:34:30PM +, Stuart Henderson wrote: > On 2022/11/24 14:36, Vitaliy Makkoveev wrote: > > On Wed, Nov 23, 2022 at 09:36:28PM -0700, Theo de Raadt wrote: > > > Theo de Raadt wrote: > > > > > > > > The other, that if both exist, > > > > > /etc/hostname.$if will override

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Vitaliy Makkoveev
On Wed, Nov 23, 2022 at 09:36:28PM -0700, Theo de Raadt wrote: > Theo de Raadt wrote: > > > > The other, that if both exist, > > > /etc/hostname.$if will override /etc/hostname.$lladdr. > > > > We do need to decide which one is priority, and document that. > > > > I am still unsure which is

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Theo de Raadt
Vitaliy Makkoveev wrote: > > On 24 Nov 2022, at 19:20, Theo de Raadt wrote: > > > >> I like to exclude pseudo devices. The pseudo device list is immutable, > >> so we need to get only once during /etc/netstart. > > > > Why do we need to excluse them? > > > > The users will learn when to use

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Theo de Raadt
> I like to exclude pseudo devices. The pseudo device list is immutable, > so we need to get only once during /etc/netstart. Why do we need to excluse them? The users will learn when to use this, and when not to.

Re: Document struct nd_ifinfo protection, remove obsolete .initialized member

2022-11-24 Thread Klemens Nanni
On Wed, Nov 23, 2022 at 06:03:40PM +, Klemens Nanni wrote: > "Push kernel lock into in6_ioctl()" on tech@ talks about ND6 locking, > here is one cleanup and one documentation change (squashed) for this. Complete diff with the missing ndp(8) bits and more background info. Feedback? Objection?

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Vitaliy Makkoveev
> On 24 Nov 2022, at 19:20, Theo de Raadt wrote: > >> I like to exclude pseudo devices. The pseudo device list is immutable, >> so we need to get only once during /etc/netstart. > > Why do we need to excluse them? > > The users will learn when to use this, and when not to. > So, I can't use

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Theo de Raadt
Theo de Raadt wrote: > Vitaliy Makkoveev wrote: > > > > On 24 Nov 2022, at 19:20, Theo de Raadt wrote: > > > > > >> I like to exclude pseudo devices. The pseudo device list is immutable, > > >> so we need to get only once during /etc/netstart. > > > > > > Why do we need to excluse them? > >

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-24 Thread Klemens Nanni
On Thu, Nov 24, 2022 at 10:16:29AM +0100, Claudio Jeker wrote: > On Wed, Nov 23, 2022 at 10:00:52PM +, Klemens Nanni wrote: > > On Wed, Nov 23, 2022 at 10:47:53PM +0100, Claudio Jeker wrote: > > > On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: > > > > void > > > >

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Theo de Raadt
How about if ifconfig -M skips devices that are IFXF_CLONED? That lookup might not be atomic (I don't think xflags is in the ifaddrs list), but I don't think atomicity matters. Then the hostname.MAC will always work on the underlying physical device. Or is there another way to identify overlay

Re: Let nd6_if{at,de}tach() be void and take an ifp argument

2022-11-24 Thread Claudio Jeker
On Wed, Nov 23, 2022 at 10:00:52PM +, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 10:47:53PM +0100, Claudio Jeker wrote: > > On Wed, Nov 23, 2022 at 02:54:08PM +, Klemens Nanni wrote: > > > void > > > -nd6_ifdetach(struct nd_ifinfo *nd) > > > +nd6_ifdetach(struct ifnet *ifp) > > > { >

Re: aplsmc(4): disable backlight when lid is closed

2022-11-24 Thread Mark Kettenis
> Date: Thu, 24 Nov 2022 19:04:03 +0100 > From: Tobias Heider > > The diff below disables the screen backlight on apple silicon macs when the > lid is closed. Can we distinguish lid close events from lid open events? Might make more sense to base the decision to turn the display off based on

aplsmc(4): disable backlight when lid is closed

2022-11-24 Thread Tobias Heider
The diff below disables the screen backlight on apple silicon macs when the lid is closed. Normally, we suspend or hibernate depending on the value of machdep.lid_action. Since suspend doesn't work reliably yet I think this is a good intermediate solution to save some power while the laptop is

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Andrew Hewus Fresh
I think this is the bits the installer needs. I might adjust /etc/netstart to use this glob or this to use *:*, still thinking on it. It's a bit simpler because I figured the installer could be quieter so I could just return instead of printing errors first. I haven't tested this yet. We'll

Re: aplsmc(4): disable backlight when lid is closed

2022-11-24 Thread Tobias Heider
On Thu, Nov 24, 2022 at 08:36:48PM +0100, Mark Kettenis wrote: > > Date: Thu, 24 Nov 2022 19:04:03 +0100 > > From: Tobias Heider > > > > The diff below disables the screen backlight on apple silicon macs when the > > lid is closed. > > Can we distinguish lid close events from lid open events?

Re: lladdr support for netstart/hostname.if

2022-11-24 Thread Theo de Raadt
Andrew spotted a potential issue with the short-circuit ordering, so here is a newer diff. Index: ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrieving revision 1.385 diff -u -p -u -r1.385 ifconfig.8 --- ifconfig.8