2
0
Эх сурвалжийг харах

core: tcp_main - include local dst port in conn lookup when using haproxy

(cherry picked from commit 9c109f3a371445e03defde279912fbb4179244bd)
Alexander Bakker 8 сар өмнө
parent
commit
01429a8538
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      src/core/tcp_main.c

+ 2 - 1
src/core/tcp_main.c

@@ -1745,7 +1745,8 @@ struct tcp_connection *_tcpconn_find(int id, struct ip_addr *ip, int port,
 			print_ip("ip=", &a->parent->rcv.src_ip, "\n");
 #endif
 			if((a->parent->state != S_CONN_BAD) && (port == a->port)
-					&& ((l_port == 0) || (l_port == a->parent->rcv.dst_port))
+					&& ((l_port == 0) || (l_port == a->parent->rcv.dst_port)
+							|| (l_port == a->parent->cinfo.dst_port))
 					&& (ip_addr_cmp(ip, &a->parent->rcv.src_ip))
 					&& (is_local_ip_any
 							|| ip_addr_cmp(l_ip, &a->parent->rcv.dst_ip)