aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2023-08-02 07:40:34 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2023-08-08 10:22:10 +0000
commit600bf006d3f15f170b9209d5d3a37437bfe0850e (patch)
treea59246d705d77565478c437dd139bc0d20270ea4
parente0bc8f8da2b3f40b74925a28c2c7f4236bd94c3f (diff)
downloadsrc-600bf006d3f15f170b9209d5d3a37437bfe0850e.tar.gz
src-600bf006d3f15f170b9209d5d3a37437bfe0850e.zip
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
-rw-r--r--sys/netinet/ip_carp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 935e7eaf92f5..d1a41e10115f 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -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;