Module: kamailio
Branch: 5.3
Commit: cca28078f7fe329046744c9b63d01bb9945a8dca
URL:
https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
Author: Donato Sciarra <donato.sciarra(a)bmw.de>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-05-01T09:55:25+02:00
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)
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
Patch:
https://github.com/kamailio/kamailio/commit/cca28078f7fe329046744c9b63d01bb…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 99d33ee719..1c9859f633 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -2029,7 +2029,7 @@ int tcp_send(struct dest_info* dst, union sockaddr_union* from,
if (likely(port)){
/* try again w/o id */
if(tcp_connection_match==TCPCONN_MATCH_STRICT) {
- c=tcpconn_lookup(dst->id, &ip, port, from, try_local_port, con_lifetime);
+ c=tcpconn_lookup(0, &ip, port, from, try_local_port, con_lifetime);
} else {
c=tcpconn_get(0, &ip, port, from, con_lifetime);
}