[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.
diff --git a/src/backend.c b/src/backend.c
index d456afd..6ba3937 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1254,8 +1254,8 @@
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;