mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 06:24:56 +00:00
[BUG] use backend's source and not server's source with tproxy
copy-paste typo.
This commit is contained in:
parent
0a45989de3
commit
786d1915b0
@ -1274,7 +1274,6 @@ int connect_server(struct session *s)
|
||||
struct sockaddr_in *remote = NULL;
|
||||
int ret, flags = 0;
|
||||
|
||||
if (s->srv->state & SRV_TPROXY_MASK) {
|
||||
switch (s->srv->state & SRV_TPROXY_MASK) {
|
||||
case SRV_TPROXY_ADDR:
|
||||
remote = (struct sockaddr_in *)&s->srv->tproxy_addr;
|
||||
@ -1289,8 +1288,6 @@ int connect_server(struct session *s)
|
||||
remote = (struct sockaddr_in *)&s->cli_addr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ret = bind_ipv4(fd, flags, &s->srv->source_addr, remote);
|
||||
if (ret) {
|
||||
close(fd);
|
||||
@ -1314,7 +1311,6 @@ int connect_server(struct session *s)
|
||||
struct sockaddr_in *remote = NULL;
|
||||
int ret, flags = 0;
|
||||
|
||||
if (s->be->options & PR_O_TPXY_MASK) {
|
||||
switch (s->be->options & PR_O_TPXY_MASK) {
|
||||
case PR_O_TPXY_ADDR:
|
||||
remote = (struct sockaddr_in *)&s->be->tproxy_addr;
|
||||
@ -1329,9 +1325,8 @@ int connect_server(struct session *s)
|
||||
remote = (struct sockaddr_in *)&s->cli_addr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ret = bind_ipv4(fd, flags, &s->srv->source_addr, remote);
|
||||
ret = bind_ipv4(fd, flags, &s->be->source_addr, remote);
|
||||
if (ret) {
|
||||
close(fd);
|
||||
if (ret == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user