Module: kamailio
Branch: master
Commit: b34d06ffbee58d51f4ab01c394bdcf66ce6ba831
URL:
https://github.com/kamailio/kamailio/commit/b34d06ffbee58d51f4ab01c394bdcf6…
Author: Aleksandar Yosifov <alexyosifov(a)gmail.com>
Committer: Aleksandar Yosifov <alexyosifov(a)gmail.com>
Date: 2019-08-02T15:13:20+03:00
ims_registrar_pcscf: reconfig ipsec in save pending
- Reconfig ipsec tunnels for each new pending contact.
If there are no registered contacts remove all SAs/Policies.
---
Modified: src/modules/ims_registrar_pcscf/save.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b34d06ffbee58d51f4ab01c394bdcf6…
Patch:
https://github.com/kamailio/kamailio/commit/b34d06ffbee58d51f4ab01c394bdcf6…
---
diff --git a/src/modules/ims_registrar_pcscf/save.c
b/src/modules/ims_registrar_pcscf/save.c
index 50d1fb2333..4a930a55c3 100644
--- a/src/modules/ims_registrar_pcscf/save.c
+++ b/src/modules/ims_registrar_pcscf/save.c
@@ -363,6 +363,8 @@ int save_pending(struct sip_msg* _m, udomain_t* _d) {
ul.lock_udomain(_d, &ci.via_host, ci.via_port, ci.via_prot);
if (ul.get_pcontact(_d, &ci, &pcontact) != 0) { //need to insert new contact
+ ipsec_pcscf.ipsec_reconfig(); // try to clean all ipsec SAs/Policies if there is no
registered contacts
+
LM_DBG("Adding pending pcontact: <%.*s>\n", c->uri.len,
c->uri.s);
ci.reg_state=PCONTACT_REG_PENDING;
if (ul.insert_pcontact(_d, &c->uri, &ci, &pcontact) != 0) {