Subject: Re: ifconfig -s when interface is down?
To: =?iso-8859-1?Q?Gr=E9goire?= Sutre <gregoire.sutre@labri.fr>
From: Martin Husemann <martin@duskware.de>
List: tech-userlevel
Date: 11/24/2004 21:10:03
On Wed, Nov 24, 2004 at 08:59:47PM +0100, Grégoire Sutre wrote:
> Unfortunately, this does not work anymore under my NetBSD 2.0_RC4 box
> (i386) since whenever the interface is down, `ifconfig -s ex0' returns
> the same status (true) regardless of the presence of a network cable.

Heh, incidently I just looked at a PR today where the bce driver does not
report network link status correctly. After a bit digging around, I found
that the interface needs to be marked UP to properly report the linnk status.

Could you try "ifconfig ex0 up" and then "ifconfig -s ex0"?

I think this behaviour is reasonable, as for example with a wifi interface
and a notebook the test for network presence may need more power, and you 
don't wont to waste that sometimes. With the UP flag you have explicit
controll over wich interfaces are potential active, and if you tell an
interface its down - it realy is down.

Martin