[BUG] transparent proxy address was ignored in backend

When the "source x.x.x.x usesrc y.y.y.y" statement was present in a
backend, the y.y.y.y address was fetched from the server instead of
the backend.
This commit is contained in:
Willy Tarreau 2007-12-14 19:54:43 +01:00
parent e5b77e82c7
commit 4009f016c2

View File

@ -1254,8 +1254,8 @@ int connect_server(struct session *s)
itp1.op = TPROXY_ASSIGN;
switch (s->be->options & PR_O_TPXY_MASK) {
case PR_O_TPXY_ADDR:
itp1.v.addr.faddr = s->srv->tproxy_addr.sin_addr;
itp1.v.addr.fport = s->srv->tproxy_addr.sin_port;
itp1.v.addr.faddr = s->be->tproxy_addr.sin_addr;
itp1.v.addr.fport = s->be->tproxy_addr.sin_port;
break;
case PR_O_TPXY_CLI:
itp1.v.addr.fport = ((struct sockaddr_in *)&s->cli_addr)->sin_port;