mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MINOR: unix: use conn->dst for the target address in ->connect()
No extra check is needed since the destination must be set there.
This commit is contained in:
parent
7bbc4a511f
commit
ca9f5a927a
@ -409,7 +409,7 @@ static int uxst_pause_listener(struct listener *l)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This function initiates a UNIX connection establishment to the target assigned
|
* This function initiates a UNIX connection establishment to the target assigned
|
||||||
* to connection <conn> using (si->{target,addr.to}). The source address is ignored
|
* to connection <conn> using (si->{target,dst}). The source address is ignored
|
||||||
* and will be selected by the system. conn->target may point either to a valid
|
* and will be selected by the system. conn->target may point either to a valid
|
||||||
* server or to a backend, depending on conn->target. Only OBJ_TYPE_PROXY and
|
* server or to a backend, depending on conn->target. Only OBJ_TYPE_PROXY and
|
||||||
* OBJ_TYPE_SERVER are supported. The <data> parameter is a boolean indicating
|
* OBJ_TYPE_SERVER are supported. The <data> parameter is a boolean indicating
|
||||||
@ -519,7 +519,7 @@ static int uxst_connect_server(struct connection *conn, int flags)
|
|||||||
if (global.tune.server_rcvbuf)
|
if (global.tune.server_rcvbuf)
|
||||||
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &global.tune.server_rcvbuf, sizeof(global.tune.server_rcvbuf));
|
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &global.tune.server_rcvbuf, sizeof(global.tune.server_rcvbuf));
|
||||||
|
|
||||||
if (connect(fd, (struct sockaddr *)&conn->addr.to, get_addr_len(&conn->addr.to)) == -1) {
|
if (connect(fd, (struct sockaddr *)conn->dst, get_addr_len(conn->dst)) == -1) {
|
||||||
if (errno == EINPROGRESS || errno == EALREADY) {
|
if (errno == EINPROGRESS || errno == EALREADY) {
|
||||||
conn->flags |= CO_FL_WAIT_L4_CONN;
|
conn->flags |= CO_FL_WAIT_L4_CONN;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user