]> git.kaiwu.me - haproxy.git/commitdiff
[BUG] use backend's source and not server's source with tproxy
authorWilly Tarreau <w@1wt.eu>
Sun, 20 Jan 2008 22:53:08 +0000 (23:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 20 Jan 2008 23:28:18 +0000 (00:28 +0100)
Checks were using server's source even when only backend's was
defined using tproxy.

src/checks.c

index 0cd1a874179886a9d127acfa1e8e9521e2c7a4c0..dde9fdbce18d58d45ca4410c7b190622da14dc89 100644 (file)
@@ -377,8 +377,8 @@ void process_chk(struct task *t, struct timeval *next)
                                                memset(&itp1, 0, sizeof(itp1));
                                                
                                                itp1.op = TPROXY_ASSIGN;
-                                               itp1.v.addr.faddr = s->tproxy_addr.sin_addr;
-                                               itp1.v.addr.fport = s->tproxy_addr.sin_port;
+                                               itp1.v.addr.faddr = s->proxy->tproxy_addr.sin_addr;
+                                               itp1.v.addr.fport = s->proxy->tproxy_addr.sin_port;
                                                
                                                /* set connect flag on socket */
                                                itp2.op = TPROXY_FLAGS;