diff options
author | glebius <glebius@FreeBSD.org> | 2008-12-05 14:37:14 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2008-12-05 14:37:14 +0000 |
commit | 1a93d72fb6e02da94a8bbc4bac0807f21581bbc1 (patch) | |
tree | 02926234e5a1f1cb06d2da77b43edd33c9e7a2ad /sys/netinet/ip_carp.c | |
parent | 0ac14961cc48c1ab4910a0dfb21d6d4a3137f5a6 (diff) | |
download | FreeBSD-src-1a93d72fb6e02da94a8bbc4bac0807f21581bbc1.zip FreeBSD-src-1a93d72fb6e02da94a8bbc4bac0807f21581bbc1.tar.gz |
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.
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index b4212cc..9f6bc31 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -2148,6 +2148,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa, 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, int state) 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 |