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