From: Willy Tarreau Date: Fri, 1 May 2015 17:12:05 +0000 (+0200) Subject: MEDIUM: config: propagate the table's process list to the peers sections X-Git-Tag: v1.6-dev2~154 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fca4835b299c2172f53c01f997a9ee0d2d2389e;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index ffe80be38d..cf6637be89 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -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; diff --git a/src/peers.c b/src/peers.c index 59f934d780..9cc4e0d1fd 100644 --- a/src/peers.c +++ b/src/peers.c @@ -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 */ } /*