MEDIUM: config: propagate the table's process list to the peers sections
Now a peers section has its bind_proc set to the union of all those of
its users.
(cherry picked from commit 0fca4835b299c2172f53c01f997a9ee0d2d2389e)
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 392a78d..9812ec2 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -1841,6 +1841,7 @@
curpeers->peers_fe->options2 |= PR_O2_INDEPSTR | PR_O2_SMARTCON | PR_O2_SMARTACC;
curpeers->peers_fe->conf.args.file = curpeers->peers_fe->conf.file = strdup(file);
curpeers->peers_fe->conf.args.line = curpeers->peers_fe->conf.line = linenum;
+ curpeers->peers_fe->bind_proc = 0; /* will be filled by users */
bind_conf = bind_conf_alloc(&curpeers->peers_fe->conf.bind, file, linenum, args[2]);
@@ -7399,6 +7400,11 @@
global.last_checks |= cfg_opts2[optnum].checks;
}
+ /* compute the required process bindings for the peers */
+ for (curproxy = proxy; curproxy; curproxy = curproxy->next)
+ if (curproxy->table.peers.p)
+ curproxy->table.peers.p->peers_fe->bind_proc |= curproxy->bind_proc;
+
if (peers) {
struct peers *curpeers = peers, **last;
struct peer *p, *pb;