浏览代码

ims_ipsec_pcscf: TLS support in ipsec_forward() improved

This patch was initially done by Herle Supreeth in his fork but isn't present upstream yet:
https://github.com/kamailio/kamailio/commit/8b9a2977e111d9adb8595d98ab59f8c8eb033120

See also: https://github.com/kamailio/kamailio/issues/3772
Axel Sommerfeldt 1 年之前
父节点
当前提交
3154a0aba5
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/modules/ims_ipsec_pcscf/cmd.c

+ 4 - 0
src/modules/ims_ipsec_pcscf/cmd.c

@@ -1126,6 +1126,10 @@ int ipsec_forward(struct sip_msg *m, udomain_t *d, int _cflags)
 			buf_len =
 					snprintf(buf, sizeof(buf) - 1, "sip:%.*s:%d;transport=tcp",
 							ci.via_host.len, ci.via_host.s, dst_port);
+		} else if((_cflags & IPSEC_SETDSTURI_FULL) && (dst_proto == PROTO_TLS)) {
+			buf_len =
+					snprintf(buf, sizeof(buf) - 1, "sip:%.*s:%d;transport=tls",
+							ci.via_host.len, ci.via_host.s, dst_port);
 		} else {
 			buf_len = snprintf(buf, sizeof(buf) - 1, "sip:%.*s:%d",
 					ci.via_host.len, ci.via_host.s, dst_port);