Module: kamailio
Branch: master
Commit: bf863877f666dd8350e855bf933270b2fd8ad0fd
URL:
https://github.com/kamailio/kamailio/commit/bf863877f666dd8350e855bf933270b…
Author: herlesupreeth <herlesupreeth(a)gmail.com>
Committer: Supreeth Herle <herlesupreeth(a)gmail.com>
Date: 2024-06-17T13:37:12+02:00
ims_ipsec_pcscf: update security params of newly created ipsec tunnel in contact
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bf863877f666dd8350e855bf933270b…
Patch:
https://github.com/kamailio/kamailio/commit/bf863877f666dd8350e855bf933270b…
---
diff --git a/src/modules/ims_ipsec_pcscf/cmd.c b/src/modules/ims_ipsec_pcscf/cmd.c
index 05079834252..3ce36d27952 100644
--- a/src/modules/ims_ipsec_pcscf/cmd.c
+++ b/src/modules/ims_ipsec_pcscf/cmd.c
@@ -900,12 +900,10 @@ int ipsec_create(struct sip_msg *m, udomain_t *d, int _cflags)
goto cleanup;
}
- if(ul.update_pcontact(d, &ci, pcontact) != 0) {
- LM_ERR("Error updating contact\n");
- goto cleanup;
- }
-
if(ci.via_port == SIP_PORT) {
+ if(req_sec_params != NULL) {
+ pcontact->security_temp->data.ipsec = s;
+ }
// Update temp security parameters
if(ul.update_temp_security(d, pcontact->security_temp->type,
pcontact->security_temp, pcontact)
@@ -914,6 +912,10 @@ int ipsec_create(struct sip_msg *m, udomain_t *d, int _cflags)
}
}
+ if(ul.update_pcontact(d, &ci, pcontact) != 0) {
+ LM_ERR("Error updating contact\n");
+ goto cleanup;
+ }
if(add_supported_secagree_header(m) != 0) {
goto cleanup;