mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 15:21:29 +02:00
BUG/MEDIUM: checks: don't call connect() on unsupported address families
At the moment, all address families supported on a "server" statement support a connect() method, but this will soon change with the generalization of str2sa_range(). Checks currently call ->connect() unconditionally so let's add a check for this.
This commit is contained in:
parent
df350f1f48
commit
8f46ccad27
@ -1377,8 +1377,10 @@ static struct task *process_chk(struct task *t)
|
|||||||
* Note that we try to prevent the network stack from sending the ACK during the
|
* Note that we try to prevent the network stack from sending the ACK during the
|
||||||
* connect() when a pure TCP check is used (without PROXY protocol).
|
* connect() when a pure TCP check is used (without PROXY protocol).
|
||||||
*/
|
*/
|
||||||
ret = s->check.proto->connect(conn, s->proxy->options2 & PR_O2_CHK_ANY,
|
ret = SN_ERR_INTERNAL;
|
||||||
s->check.send_proxy ? 1 : (s->proxy->options2 & PR_O2_CHK_ANY) ? 0 : 2);
|
if (s->check.proto->connect)
|
||||||
|
ret = s->check.proto->connect(conn, s->proxy->options2 & PR_O2_CHK_ANY,
|
||||||
|
s->check.send_proxy ? 1 : (s->proxy->options2 & PR_O2_CHK_ANY) ? 0 : 2);
|
||||||
conn->flags |= CO_FL_WAKE_DATA;
|
conn->flags |= CO_FL_WAKE_DATA;
|
||||||
if (s->check.send_proxy)
|
if (s->check.send_proxy)
|
||||||
conn->flags |= CO_FL_LOCAL_SPROXY;
|
conn->flags |= CO_FL_LOCAL_SPROXY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user