From: Willy Tarreau Date: Thu, 17 Jan 2013 20:34:52 +0000 (+0100) Subject: BUG/MEDIUM: peers: only the last peers section was used by tables X-Git-Tag: v1.5-dev18~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=973ca497953bfc668f9879c3977942a1c6e1e536;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: peers: only the last peers section was used by tables Due to a typo in the peers section lookup code, the last declared peers section was used instead of the one matching the requested name. This bug has been there since the very first commit on peers section (1.5-dev2). --- diff --git a/src/cfgparse.c b/src/cfgparse.c index abcb9c5866..87fbcfff3e 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -6192,7 +6192,7 @@ int check_config_validity() for (curpeers = peers; curpeers; curpeers = curpeers->next) { if (strcmp(curpeers->id, curproxy->table.peers.name) == 0) { free((void *)curproxy->table.peers.name); - curproxy->table.peers.p = peers; + curproxy->table.peers.p = curpeers; break; } }