On Sat, Mar 06, 2021 at 08:59:16AM GMT, Florian Obser wrote:
> On Sat, Mar 06, 2021 at 06:41:44AM +0000, Adam Steen wrote:
> > >Synopsis:  dhcpleased does not acquire a lease
> > >Category:  networking
> > >Environment:
> >     System      : OpenBSD 6.9
> >     Details     : OpenBSD 6.9-beta (GENERIC.MP) #376: Thu Mar  4 21:04:56 
> > MST 2021
> >                      
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > 
> >     Architecture: OpenBSD.amd64
> >     Machine     : amd64
> > >Description:
> >     Testing dhcpleased with a trunk interface and it doesn't acquire a 
> > lease.
> > >How-To-Repeat:
> >     command before new line completed first, then ones after
> >     terminal 1
> >             pkill dhcpleased
> > 
> >             dhcpleased -dv
> >             IMSG_OPEN_BPFSOCK
> >             open_bpfsock: 6
> >             state_transition Down -> Down, timo: -1
> >             set_bpfsock: 6 fd: 9
> >     terminal 2
> >             ifconfig trunk0 -inet
> >             ifconfig trunk0
> >             trunk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 
> your interface is not "UP"
> 
> >                     lladdr f0:de:f1:77:c2:c8
> >                     index 6 priority 0 llprio 3
> >                     trunk: trunkproto failover
> >                             iwn0 port active
> >                             em0 port master
> >                     groups: trunk egress
> >                     media: Ethernet autoselect
> >                     status: active
> > 
> >             ifconfig trunk0 inet autoconf
> 
>       ifconfig trunk0 up
> 
> should make it go. There is currently a discussion going on if
> ifconfig(8) should implicitly bring interfaces up, until that is
> settled you either need ifconfig $IF up or add "up" to your
> hostname.if(5) file.

FWIW, I've made the same mistake thinking that "inet autoconf" and
"dhcp" are functionally equivalent.

I based the assumption both on the commit message[0]:

        The flag can be set by "ifconfig $if inet autoconf" or by
        adding "inet autoconf" to /etc/hostname.if. An existing
        "dhcp" line should be removed.

i.e. no mention of additional "up"; and the fact that "up" is already
implied when "dhcp" is being used.

I can understand both sides to the argument, i.e. on the one hand
you can configure several interfaces without bringing any of them
up; or why would you configure an interface if you don't want to
use it, not to mention one command less to run or one less option
to use in hostname.if(5), on the other.

[0] https://marc.info/?l=openbsd-cvs&m=161435621007396&w=2

Cheers,

Raf

Reply via email to