Browse code

core: do not use tcp id for lookup if not needed

In case the first lookup (with tcp id) is not successfull, the second
attempt should have been performed without a tcp id.
Issue was introduced with dc43750644 (new global parameter
tcp_connection_match) in 5.3.

(cherry picked from commit 24a3a172dbdecb6e987df943a3ad1acb4da664b5)

Donato Sciarra authored on 28/04/2020 08:33:23 • Daniel-Constantin Mierla committed on 01/05/2020 07:55:25
Showing 1 changed files
... ...
@@ -2029,7 +2029,7 @@ int tcp_send(struct dest_info* dst, union sockaddr_union* from,
2029 2029
 			if (likely(port)){
2030 2030
 				/* try again w/o id */
2031 2031
 				if(tcp_connection_match==TCPCONN_MATCH_STRICT) {
2032
-					c=tcpconn_lookup(dst->id, &ip, port, from, try_local_port, con_lifetime);
2032
+					c=tcpconn_lookup(0, &ip, port, from, try_local_port, con_lifetime);
2033 2033
 				} else {
2034 2034
 					c=tcpconn_get(0, &ip, port, from, con_lifetime);
2035 2035
 				}