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.
This commit is contained in:
parent
0ac14961cc
commit
1a93d72fb6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user