mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR server: Restrict dynamic cookie check to the same proxy.
Each time we generate a dynamic cookie, we try to make sure the same cookie hasn't been generated for another server, it's very unlikely, but it may happen. We only have to check that for the servers in the same proxy, no, need to check in others, plus the code was buggy and would always check in the first proxy of the proxy list.
This commit is contained in:
parent
c28bb55cdc
commit
b4a2d5e19a
@ -135,8 +135,7 @@ void srv_set_dyncookie(struct server *s)
|
|||||||
* Check that we did not get a hash collision.
|
* Check that we did not get a hash collision.
|
||||||
* Unlikely, but it can happen.
|
* Unlikely, but it can happen.
|
||||||
*/
|
*/
|
||||||
for (p = proxy; p != NULL; p = p->next)
|
for (tmpserv = p->srv; tmpserv != NULL;
|
||||||
for (tmpserv = proxy->srv; tmpserv != NULL;
|
|
||||||
tmpserv = tmpserv->next) {
|
tmpserv = tmpserv->next) {
|
||||||
if (tmpserv == s)
|
if (tmpserv == s)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user