mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
BUG: proxy: fix server name lookup in get_backend_server()
The lookup was broken by commit 050536d5. The server ID is initialized to a negative value but unfortunately not all the tests were converted. Thanks to Igor at owind for reporting it.
This commit is contained in:
parent
a1629a59d1
commit
4055a107a7
@ -115,8 +115,8 @@ int get_backend_server(const char *bk_name, const char *sv_name,
|
||||
return 0;
|
||||
|
||||
for (s = p->srv; s; s = s->next)
|
||||
if ((sid && s->puid == sid) ||
|
||||
(!sid && strcmp(s->id, sv_name) == 0))
|
||||
if ((sid >= 0 && s->puid == sid) ||
|
||||
(sid < 0 && strcmp(s->id, sv_name) == 0))
|
||||
break;
|
||||
*sv = s;
|
||||
if (!s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user