carp: delete interface routes on link loss.

Obtained from:	Yandex LLC
MFC after:	10 days
Sponsored by:	Yandex LLC
Differential Revision: https://reviews.freebsd.org/D41290
This commit is contained in:
Andrey V. Elsukov 2023-08-02 10:40:34 +03:00
parent e0bc8f8da2
commit 600bf006d3

View File

@ -2159,6 +2159,7 @@ carp_sc_state(struct carp_softc *sc)
#endif
carp_set_state(sc, INIT, "hardware interface down");
carp_setrun(sc, 0);
carp_delroute(sc);
if (!sc->sc_suppress)
carp_demote_adj(V_carp_ifdown_adj, "interface down");
sc->sc_suppress = 1;