diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2008-12-05 14:37:14 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2008-12-05 14:37:14 +0000 |
| commit | 0b476f1cce316ea44e4efcda28303cfd77884aa6 (patch) | |
| tree | 02926234e5a1f1cb06d2da77b43edd33c9e7a2ad | |
| parent | b4824b48b4829bfcf7fe3f57ea01e854ce0c9ab4 (diff) | |
Notes
| -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 b4212cc19f0c..9f6bc312c580 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 |
