[sr-dev] git:master:b34d06ff: ims_registrar_pcscf: reconfig ipsec in save pending

Aleksandar Yosifov alexyosifov at gmail.com
Sat Aug 10 22:05:19 CEST 2019

Module: kamailio
Branch: master
Commit: b34d06ffbee58d51f4ab01c394bdcf66ce6ba831
URL: https://github.com/kamailio/kamailio/commit/b34d06ffbee58d51f4ab01c394bdcf66ce6ba831

Author: Aleksandar Yosifov <alexyosifov at gmail.com>
Committer: Aleksandar Yosifov <alexyosifov at 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/b34d06ffbee58d51f4ab01c394bdcf66ce6ba831.diff
Patch: https://github.com/kamailio/kamailio/commit/b34d06ffbee58d51f4ab01c394bdcf66ce6ba831.patch


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);
 		if (ul.insert_pcontact(_d, &c->uri, &ci, &pcontact) != 0) {

More information about the sr-dev mailing list