]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: config: propagate the table's process list to the peers sections
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 17:12:05 +0000 (19:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 18:16:31 +0000 (20:16 +0200)
Now a peers section has its bind_proc set to the union of all those of
its users.

src/cfgparse.c
src/peers.c

index ffe80be38d87745bf37e10187886c23ab4c4b26e..cf6637be89e767bbbe149f1d2219b6b73bd82109 100644 (file)
@@ -7898,6 +7898,11 @@ out_uri_auth_compat:
                                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;
index 59f934d780e5500bd8a9324790193c22d3e276fa..9cc4e0d1fd372b524cb8558af5156e35698ec9cf 100644 (file)
@@ -1097,6 +1097,7 @@ void peers_setup_frontend(struct proxy *fe)
        fe->accept = frontend_accept;
        fe->default_target = &peer_applet.obj_type;
        fe->options2 |= PR_O2_INDEPSTR | PR_O2_SMARTCON | PR_O2_SMARTACC;
+       fe->bind_proc = 0; /* will be filled by users */
 }
 
 /*