Blame SOURCES/bz1792160-fix-fault-rename-interface.patch

1f2fc3
From 30eeb48b1a0737dc7443fd421fd6613e0d55fd17 Mon Sep 17 00:00:00 2001
1f2fc3
From: "Z. Liu" <liuzx@knownsec.com>
1f2fc3
Date: Tue, 18 Dec 2018 16:38:24 +0800
1f2fc3
Subject: [PATCH] Also skip route not configured with down interface
1f2fc3
1f2fc3
Otherwise, if keepalived has virtual_routes configured, we create
1f2fc3
a virtual interface and bring it up and down, current code will bring
1f2fc3
VRRP state to FAULT and never return.
1f2fc3
1f2fc3
 # ip tun add test mode ipip remote 10.0.0.1 local 10.0.0.2
1f2fc3
 # ip link set test up
1f2fc3
 # ip link set test down
1f2fc3
---
1f2fc3
 keepalived/vrrp/vrrp_if.c | 4 +++-
1f2fc3
 1 file changed, 3 insertions(+), 1 deletion(-)
1f2fc3
1f2fc3
diff --git a/keepalived/vrrp/vrrp_if.c b/keepalived/vrrp/vrrp_if.c
1f2fc3
index a2087ceb..6ae2666a 100644
1f2fc3
--- a/keepalived/vrrp/vrrp_if.c
1f2fc3
+++ b/keepalived/vrrp/vrrp_if.c
1f2fc3
@@ -1051,7 +1051,9 @@ interface_down(interface_t *ifp)
1f2fc3
 			/* Any route that has an oif will be tracking the interface,
1f2fc3
 			 * so we only need to check for routes that dont specify an
1f2fc3
 			 * oif */
1f2fc3
-			if (!route->oif && route->configured_ifindex != ifp->ifindex)
1f2fc3
+			/* Don't track route if it's not configured with this down
1f2fc3
+			 * interface. */
1f2fc3
+			if (!route->oif || route->configured_ifindex != ifp->ifindex)
1f2fc3
 				continue;
1f2fc3
 
1f2fc3
 			route->set = false;
1f2fc3
-- 
1f2fc3
2.24.1
1f2fc3