[sr-dev] git:5.5:52978a08: core: check message rcv and snd proto for diff realms lump conditions

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 20 10:01:17 CEST 2021


Module: kamailio
Branch: 5.5
Commit: 52978a0873eb068be31ca0688e64c88e4872efac
URL: https://github.com/kamailio/kamailio/commit/52978a0873eb068be31ca0688e64c88e4872efac

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-08-20T10:00:27+02:00

core: check message rcv and snd proto for diff realms lump conditions

- in addition to receive socket and send socket protos, which may be the
same in cases of tcp/tls+ws/wss using same ports

(cherry picked from commit 871f8113612148a49e69218e70ed7f475fb665db)

---

Modified: src/core/msg_translator.c

---

Diff:  https://github.com/kamailio/kamailio/commit/52978a0873eb068be31ca0688e64c88e4872efac.diff
Patch: https://github.com/kamailio/kamailio/commit/52978a0873eb068be31ca0688e64c88e4872efac.patch

---

diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index a2f6505e83..0f82033c9f 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -493,8 +493,9 @@ static inline int lump_check_opt(	struct lump *l,
 		case COND_IF_DIFF_REALMS:
 			get_ip_port_proto;
 			/* faster tests first */
-			if ((port==snd_i->send_sock->port_no) && 
+			if ((port==snd_i->send_sock->port_no) &&
 					(proto==snd_i->send_sock->proto) &&
+					(msg->rcv.proto==snd_i->proto) &&
 #ifdef USE_COMP
 					(msg->rcv.comp==snd_i->comp) &&
 #endif




More information about the sr-dev mailing list