tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpcd, carrier and RTM_INFO



Roy Marples <roy%marples.name@localhost> writes:

> On Sun, 05 Feb 2012 13:56:14 -0500, Greg Troxel wrote:
>> Interface up and down and valid link are separate issues; I don't see
>> how they should be commingled.
>
> Well, a valid link but with the interface marked as down I treat it as
> carrier down in dhcpcd because things like the hardware address can
> then be changed which affects the lease.
> When it's marked as up it re-negotiates it.

Certainly if an interface is down that's important, and I didn't mean
you should ignore it.  I just meant that an interface is up if something
has done "ifconfig foo0 up" (or implicitly via assigning an address).
An interface that is administratively down (no IFF_UP flag) means that
the operator/etc. has asked that it not do anything, so if you find no
IFF_UP but positive carrier status that sounds like a bug (in the
driver).  But maybe I'm confused and down interfaces report carrier but
do nothing else.  Still, without IFF_UP I would ignore the interface.

On a 5.1 system with ex0, I find that the ifconfig 'status: active' line
goes away when the interface is down, and after ifconfig up it's briefly
status: no carrier followed by status: active.

With dhclient (sorry, I have not yet made the effort to move over to
your code on the one NetBSD machine I run a dhcp client on), I think
there's the notion of the interface being set to UP when dhclient starts
on it.

All that said, your strategy of triggering renegotiation when anything
interesting might have happened sounds entirely sensible.

Attachment: pgpZv5zwIE0Lk.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index