浏览代码

tmx: do no suspend faked request

Daniel-Constantin Mierla 6 年之前
父节点
当前提交
6f6a0d136d
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/modules/tmx/tmx_mod.c

+ 6 - 0
src/modules/tmx/tmx_mod.c

@@ -37,6 +37,7 @@
 #include "../../core/counters.h"
 #include "../../core/dset.h"
 #include "../../core/kemi.h"
+#include "../../core/fmsg.h"
 
 #include "t_var.h"
 #include "tmx_pretran.h"
@@ -705,6 +706,11 @@ static int ki_t_suspend(sip_msg_t* msg)
 	unsigned int tlabel;
 	tm_cell_t *t = 0;
 
+	if(faked_msg_match(msg)) {
+		LM_ERR("suspending a faked request is not allowed\n");
+		return -1;
+	}
+
 	t=_tmx_tmb.t_gett();
 	if (t==NULL || t==T_UNDEFINED)
 	{