Date: Fri, 5 Dec 2008 14:37:14 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185636 - head/sys/netinet Message-ID: <200812051437.mB5EbEuk056991@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812051437.mB5EbEuk056991>