From owner-freebsd-stable@FreeBSD.ORG Fri Jul 20 10:02:02 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA70D16A418 for ; Fri, 20 Jul 2007 10:02:02 +0000 (UTC) (envelope-from brutkowski@lerkins.com) Received: from qmail2.lerkins.com (qmail2.lerkins.com [195.46.43.226]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3F513C461 for ; Fri, 20 Jul 2007 10:02:01 +0000 (UTC) (envelope-from brutkowski@lerkins.com) Received: (qmail 12904 invoked by uid 0); 20 Jul 2007 09:35:19 -0000 Received: from unknown (HELO localhost) (10.10.3.41) by 10.10.3.9 with SMTP; 20 Jul 2007 09:35:19 -0000 X-Virus-Scanned: amavisd-new at e.pl Received: from stasis01.lerkins.com ([10.10.3.27]) by localhost (mail.e.pl [10.10.3.41]) (amavisd-new, port 10024) with ESMTP id jQYJg6R4JJAh for ; Fri, 20 Jul 2007 11:34:49 +0200 (CEST) Received: from smolarek.lerkins.com (smolarek.lerkins.com [195.46.43.134]) by stasis01.lerkins.com (Lerkins_SMTPD) with ESMTP id 630B98441D for ; Fri, 20 Jul 2007 11:34:49 +0200 (CEST) From: =?ISO-8859-2?Q?Bart=B3omiej?= Rutkowski To: freebsd-stable@freebsd.org X-Mailer: Sylpheed 2.4.0 (GTK+ 2.10.12; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Message-Id: <20070720093449.630B98441D@stasis01.lerkins.com> Date: Fri, 20 Jul 2007 11:34:49 +0200 (CEST) Subject: Possible devd bug X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 10:02:02 -0000 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. P.S. I am resending this message to freebsd-stable list, as I am not sure i= f freebsd-questions was a proper choice. --=20 Bart=B3omiej Rutkowski