Blame SOURCES/bz2054249-fix-unweighted-track-scripts.patch

65100f
From d93b2051641ebfc4c5dcdc405ed0f26b9bcaa65a Mon Sep 17 00:00:00 2001
65100f
From: Quentin Armitage <quentin@armitage.org.uk>
65100f
Date: Sat, 25 Jul 2020 10:13:32 +0100
65100f
Subject: [PATCH] vrrp: Don't remove unweighted track scripts from sync group
65100f
 members
65100f
65100f
Commit 3390697 - "vrrp: rewrote framework using list_head_t design"
65100f
cleared the track_script list for any vrrp instance that was in a
65100f
sync group. This was due to the old list structure allocating memory
65100f
which had to be freed if the list was empty, but that is no longer
65100f
the case with list_head.
65100f
65100f
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
65100f
---
65100f
 keepalived/vrrp/vrrp.c | 3 +--
65100f
 1 file changed, 1 insertion(+), 2 deletions(-)
65100f
65100f
diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c
65100f
index c8967eef..c7ded6b4 100644
65100f
--- a/keepalived/vrrp/vrrp.c
65100f
+++ b/keepalived/vrrp/vrrp.c
65100f
@@ -3406,7 +3406,7 @@ vrrp_complete_instance(vrrp_t * vrrp)
65100f
 		free_track_if_list(&vrrp->track_ifp);
65100f
 
65100f
 		/* Ignore any weighted script */
65100f
-		list_for_each_entry_safe(sc, sc_tmp, &vrrp->track_script,e_list) {
65100f
+		list_for_each_entry_safe(sc, sc_tmp, &vrrp->track_script, e_list) {
65100f
 			if (sc->weight) {
65100f
 				report_config_error(CONFIG_GENERAL_ERROR, "(%s) ignoring "
65100f
 									  "tracked script %s with weights due to %s"
65100f
@@ -3417,7 +3417,6 @@ vrrp_complete_instance(vrrp_t * vrrp)
65100f
 				free_track_script(sc);
65100f
 			}
65100f
 		}
65100f
-		free_track_script_list(&vrrp->track_script);
65100f
 
65100f
 		/* Set tracking files to unweighted if weight not explicitly set, otherwise ignore */
65100f
 		list_for_each_entry_safe(tfl, tfl_tmp, &vrrp->track_file, e_list) {
65100f
-- 
65100f
2.33.1
65100f