From owner-svn-src-all@FreeBSD.ORG Fri Dec 5 14:37:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD3DA1065673; Fri, 5 Dec 2008 14:37:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBFBD8FC16; Fri, 5 Dec 2008 14:37:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB5EbE34056992; Fri, 5 Dec 2008 14:37:14 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB5EbEuk056991; Fri, 5 Dec 2008 14:37:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <200812051437.mB5EbEuk056991@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 5 Dec 2008 14:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185636 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 14:37:15 -0000 Author: glebius Date: Fri Dec 5 14:37:14 2008 New Revision: 185636 URL: http://svn.freebsd.org/changeset/base/185636 Log: In a case of CARP status change run through the if_link_state_change() routine, so that devd(8) and others are notified about link state change. Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Dec 5 13:40:25 2008 (r185635) +++ head/sys/netinet/ip_carp.c Fri Dec 5 14:37:14 2008 (r185636) @@ -2148,6 +2148,7 @@ carp_output(struct ifnet *ifp, struct mb static void carp_set_state(struct carp_softc *sc, int state) { + int link_state; if (sc->sc_carpdev) CARP_SCLOCK_ASSERT(sc); @@ -2158,16 +2159,16 @@ carp_set_state(struct carp_softc *sc, in sc->sc_state = state; switch (state) { case BACKUP: - SC2IFP(sc)->if_link_state = LINK_STATE_DOWN; + link_state = LINK_STATE_DOWN; break; case MASTER: - SC2IFP(sc)->if_link_state = LINK_STATE_UP; + link_state = LINK_STATE_UP; break; default: - SC2IFP(sc)->if_link_state = LINK_STATE_UNKNOWN; + link_state = LINK_STATE_UNKNOWN; break; } - rt_ifmsg(SC2IFP(sc)); + if_link_state_change(SC2IFP(sc), link_state); } void