summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-21 22:42:55 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-05-17 00:27:08 +0000
commitc4485ad5aaade4b6f68b932a9be35b7f911b50cf (patch)
treee43df25f562c8caf657a0a37814fca15c4fb72db
parent62475ecd43b5394aef378ac09949512235bf0c17 (diff)
vrrpd: do not transition to backup on ifdown
Transitioning to backup on an interface down causes all sorts of problems when it comes back up, not least of which is breaking preempt mode. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--vrrpd/vrrp.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 92ed12e239..da6f5ba4d9 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -1874,24 +1874,11 @@ void vrrp_if_down(struct interface *ifp)
vrs = vrrp_lookup_by_if_any(ifp);
for (ALL_LIST_ELEMENTS_RO(vrs, ln, vr)) {
- if (vr->v4->mvl_ifp == ifp || vr->ifp == ifp) {
- if (vr->v4->fsm.state == VRRP_STATE_MASTER) {
- DEBUGD(&vrrp_dbg_auto,
- VRRP_LOGPFX VRRP_LOGPFX_VRID
- "Interface %s down; transitioning IPv4 VRRP router to Backup",
- vr->vrid, ifp->name);
- vrrp_change_state(vr->v4, VRRP_STATE_BACKUP);
- }
- }
-
- if (vr->v6->mvl_ifp == ifp || vr->ifp == ifp) {
- if (vr->v6->fsm.state == VRRP_STATE_MASTER) {
- DEBUGD(&vrrp_dbg_auto,
- VRRP_LOGPFX VRRP_LOGPFX_VRID
- "Interface %s down; transitioning IPv6 VRRP router to Backup",
- vr->vrid, ifp->name);
- vrrp_change_state(vr->v6, VRRP_STATE_BACKUP);
- }
+ if (vr->ifp == ifp || vr->v4->mvl_ifp == ifp
+ || vr->v6->mvl_ifp == ifp) {
+ DEBUGD(&vrrp_dbg_auto,
+ VRRP_LOGPFX VRRP_LOGPFX_VRID "Interface %s down",
+ vr->vrid, ifp->name);
}
}