[sr-dev] git:master:2a80ed80: tm: use relayed_code for active type check in TMCB RESPONSE OUT

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 10 09:53:26 CET 2017


Module: kamailio
Branch: master
Commit: 2a80ed8030419ca15c4a954ea83531bb131e66b0
URL: https://github.com/kamailio/kamailio/commit/2a80ed8030419ca15c4a954ea83531bb131e66b0

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-11-10T09:51:48+01:00

tm: use relayed_code for active type check in TMCB RESPONSE OUT

- relayed_msg can be a fake reply and accessing the status field causes
  a crash (issue introduced by previous patch)

---

Modified: src/modules/tm/t_reply.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2a80ed8030419ca15c4a954ea83531bb131e66b0.diff
Patch: https://github.com/kamailio/kamailio/commit/2a80ed8030419ca15c4a954ea83531bb131e66b0.patch

---

diff --git a/src/modules/tm/t_reply.c b/src/modules/tm/t_reply.c
index e6bc4dbff1..ae6befd835 100644
--- a/src/modules/tm/t_reply.c
+++ b/src/modules/tm/t_reply.c
@@ -1978,7 +1978,7 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
 				if (unlikely(!totag_retr
 							&& has_tran_tmcbs(t, TMCB_RESPONSE_OUT))){
 					LOCK_REPLIES( t );
-					if(relayed_msg->REPLY_STATUS==uas_rb->activ_type) {
+					if(relayed_code==uas_rb->activ_type) {
 						run_trans_callbacks_with_buf( TMCB_RESPONSE_OUT, uas_rb,
 								t->uas.request, relayed_msg, TMCB_NONE_F);
 					}




More information about the sr-dev mailing list