Date: Fri, 20 Jul 2007 09:28:55 +0200 (CEST) From: =?ISO-8859-2?Q?Bart=B3omiej?= Rutkowski <brutkowski@lerkins.com> To: freebsd-questions@freebsd.org Subject: Possible devd bug Message-ID: <20070720072855.134EF84419@stasis01.lerkins.com>
next in thread | raw e-mail | index | archive | help
Hi all,
I have been playing with OpenOspf lately, and I came to a place, when I nee=
ded to ensure that an ethernet interface should always go into DOWN state w=
hen it loses its link (physically, for example the switch becames turned of=
f). I have tried to hire the devd daemon to do the job with such small defi=
nitions:
notify 100 {
match "system" "IFNET";
match "type" "LINK_DOWN";
media-type "ethernet";
action "/sbin/ifconfig $subsystem down";
};
=20
notify 200 {
match "system" "IFNET";
match "type" "LINK_UP";
media-type "ethernet";
action "/sbin/ifconfig $subsystem up";
};
And what is happening? Well, basically, when the interface detects that eth=
cable has been detached, devd triggers and makes it DOWN, which is ok. But=
, when the card got the cable attached once again (and interface detects th=
e media type and gets ACTIVE state) devd never triggers the second rule, wh=
ich should get the interface UP again.=20
I have tried that with replacing action statements with ones with proper lo=
gging actions, and when interface is UP devd gets the proper state changes =
information.=20
Now the question is: why devd doesent receive any information from interfac=
es in DOWN state? Is that proper behaviour, or a bug? Thanks for any reply,=
and for your attention.
--=20
Bart=B3omiej Rutkowski <brutkowski@lerkins.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070720072855.134EF84419>
