Module: kamailio
Branch: master
Commit: 3154a0aba5543cab75153429bc8ec617c3484f71
URL:
https://github.com/kamailio/kamailio/commit/3154a0aba5543cab75153429bc8ec61…
Author: Axel Sommerfeldt <axel.sommerfeldt(a)fastmail.de>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-18T08:03:56+01:00
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/8b9a2977e111d9adb8595d98ab59f8c…
See also:
https://github.com/kamailio/kamailio/issues/3772
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3154a0aba5543cab75153429bc8ec61…
Patch:
https://github.com/kamailio/kamailio/commit/3154a0aba5543cab75153429bc8ec61…
---
diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c
index 47f9e401702..4f7301b56c1 100644
--- a/src/modules/ims_ipsec_pcscf/cmd.c
+++ b/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);