<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2023
-- Commit Summary --
* ims_registrar_pcscf: reconfig ipsec in save pending
* ims_usrloc_pcscf: Fix problems with double mem free
* ims_ipsec_pcscf: Bug fixes and memory improvements
-- File Changes --
M src/modules/ims_ipsec_pcscf/cmd.c (42)
M src/modules/ims_ipsec_pcscf/cmd.h (5)
M src/modules/ims_ipsec_pcscf/port_gen.c (144)
M src/modules/ims_ipsec_pcscf/port_gen.h (1)
M src/modules/ims_ipsec_pcscf/spi_gen.c (108)
M src/modules/ims_ipsec_pcscf/spi_gen.h (1)
M src/modules/ims_ipsec_pcscf/spi_list.c (37)
M src/modules/ims_ipsec_pcscf/spi_list.h (1)
M src/modules/ims_registrar_pcscf/save.c (2)
M src/modules/ims_usrloc_pcscf/pcontact.c (28)
M src/modules/ims_usrloc_pcscf/usrloc.c (1)
M src/modules/ims_usrloc_pcscf/usrloc.h (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2023.patchhttps://github.com/kamailio/kamailio/pull/2023.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2023
Module: kamailio
Branch: master
Commit: 48eb3cd5d3a0ff0b8b3125d3be3b7ff60d664435
URL: https://github.com/kamailio/kamailio/commit/48eb3cd5d3a0ff0b8b3125d3be3b7ff…
Author: Aleksandar Yosifov <alexyosifov(a)gmail.com>
Committer: Aleksandar Yosifov <alexyosifov(a)gmail.com>
Date: 2019-08-02T15:13:20+03:00
ims_ipsec_pcscf: Bug fixes and memory improvements
- Fix a problem with spi_list, spi_gen and port_gen.
Now the global data structs for SPIs and IPSec ports
lists are placed into shared memory to be accessible
from different processes. SPIs and IPSec ports for expired
contacts are released properly. That process is
performed in timer's threads and for that reason the
global structs are placed into the shared memory.
- Add api for ipsec reconfig tunnels. Used in registrar
module. Improve update_contact_ipsec_params() to avoid
memory leak if the method fails.
---
Modified: src/modules/ims_ipsec_pcscf/cmd.c
Modified: src/modules/ims_ipsec_pcscf/cmd.h
Modified: src/modules/ims_ipsec_pcscf/port_gen.c
Modified: src/modules/ims_ipsec_pcscf/port_gen.h
Modified: src/modules/ims_ipsec_pcscf/spi_gen.c
Modified: src/modules/ims_ipsec_pcscf/spi_gen.h
Modified: src/modules/ims_ipsec_pcscf/spi_list.c
Modified: src/modules/ims_ipsec_pcscf/spi_list.h
---
Diff: https://github.com/kamailio/kamailio/commit/48eb3cd5d3a0ff0b8b3125d3be3b7ff…
Patch: https://github.com/kamailio/kamailio/commit/48eb3cd5d3a0ff0b8b3125d3be3b7ff…
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) {
Module: kamailio
Branch: master
Commit: 7628a2c8bf5473bcb6810d38a2551fe95b77b116
URL: https://github.com/kamailio/kamailio/commit/7628a2c8bf5473bcb6810d38a2551fe…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-08-09T16:46:49+02:00
modules: readme files regenerated - uac ... [skip ci]
---
Modified: src/modules/uac/README
---
Diff: https://github.com/kamailio/kamailio/commit/7628a2c8bf5473bcb6810d38a2551fe…
Patch: https://github.com/kamailio/kamailio/commit/7628a2c8bf5473bcb6810d38a2551fe…
---
diff --git a/src/modules/uac/README b/src/modules/uac/README
index 533d7b4183..72722e0cc4 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -412,7 +412,7 @@ modparam("uac","credential","username:domain:password")
advance.
If you define it, you also need to define “auth_username_avp”
- (Section 3.10, “auth_username_avp (string)”) and “auth_username_avp”
+ (Section 3.10, “auth_username_avp (string)”) and “auth_password_avp”
(Section 3.11, “auth_password_avp (string)”).
Example 1.9. Set auth_realm_avp parameter
@@ -426,7 +426,7 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
perform authentication.
If you define it, you also need to define “auth_realm_avp”
- (Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
+ (Section 3.9, “auth_realm_avp (string)”) and “auth_password_avp”
(Section 3.11, “auth_password_avp (string)”).
Example 1.10. Set auth_username_avp parameter
@@ -439,7 +439,7 @@ modparam("uac","auth_username_avp","$avp(i:11)")
The definition of an AVP that might contain the password to be used to
perform authentication.
- If you define it, you also need to define “auth_password_avp”
+ If you define it, you also need to define “auth_realm_avp”
(Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
(Section 3.10, “auth_username_avp (string)”).
Module: kamailio
Branch: 5.2
Commit: 82bbbd443977ee45c87958265ef064c94689c17c
URL: https://github.com/kamailio/kamailio/commit/82bbbd443977ee45c87958265ef064c…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-08-09T16:46:36+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/uac/README
---
Diff: https://github.com/kamailio/kamailio/commit/82bbbd443977ee45c87958265ef064c…
Patch: https://github.com/kamailio/kamailio/commit/82bbbd443977ee45c87958265ef064c…
---
diff --git a/src/modules/uac/README b/src/modules/uac/README
index 552353e17e..4ea666a9de 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -403,8 +403,9 @@ modparam("uac","credential","username:domain:password")
This can be used if the realm upstream will be using is not known in
advance.
- If you define it, you also need to define “auth_username_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_username_avp”
+ (Section 3.10, “auth_username_avp (string)”) and “auth_password_avp”
+ (Section 3.11, “auth_password_avp (string)”).
Example 1.9. Set auth_realm_avp parameter
...
@@ -416,8 +417,9 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
The definition of an AVP that might contain the username to be used to
perform authentication.
- If you define it, you also need to define “auth_realm_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_realm_avp”
+ (Section 3.9, “auth_realm_avp (string)”) and “auth_password_avp”
+ (Section 3.11, “auth_password_avp (string)”).
Example 1.10. Set auth_username_avp parameter
...
@@ -429,8 +431,9 @@ modparam("uac","auth_username_avp","$avp(i:11)")
The definition of an AVP that might contain the password to be used to
perform authentication.
- If you define it, you also need to define “auth_password_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_realm_avp”
+ (Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
+ (Section 3.10, “auth_username_avp (string)”).
Example 1.11. Set auth_password_avp parameter
...
Module: kamailio
Branch: 5.2
Commit: 06d6009624ec5f537838e23afc491043e6edae75
URL: https://github.com/kamailio/kamailio/commit/06d6009624ec5f537838e23afc49104…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-08-09T16:37:44+02:00
uac: fix another copy and paste error in docs
(cherry picked from commit 85994cda0a9413836386d595aab1657d1412ec8b)
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/06d6009624ec5f537838e23afc49104…
Patch: https://github.com/kamailio/kamailio/commit/06d6009624ec5f537838e23afc49104…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index 4ff984d7bf..b9caf288ac 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -327,7 +327,7 @@ modparam("uac","credential","username:domain:password")
If you define it, you also need to define
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth_username_avp"/>) and
- <quote>auth_username_avp</quote>
+ <quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
@@ -349,7 +349,7 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
If you define it, you also need to define
<quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth_realm_avp"/>) and
- <quote>auth_username_avp</quote>
+ <quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
@@ -369,7 +369,7 @@ modparam("uac","auth_username_avp","$avp(i:11)")
</para>
<para><emphasis>
If you define it, you also need to define
- <quote>auth_password_avp</quote>
+ <quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth_realm_avp"/>) and
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth_username_avp"/>).
Module: kamailio
Branch: master
Commit: 85994cda0a9413836386d595aab1657d1412ec8b
URL: https://github.com/kamailio/kamailio/commit/85994cda0a9413836386d595aab1657…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-08-09T16:36:49+02:00
uac: fix another copy and paste error in docs
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/85994cda0a9413836386d595aab1657…
Patch: https://github.com/kamailio/kamailio/commit/85994cda0a9413836386d595aab1657…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index 1967dcb91c..31072325db 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -327,7 +327,7 @@ modparam("uac","credential","username:domain:password")
If you define it, you also need to define
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth_username_avp"/>) and
- <quote>auth_username_avp</quote>
+ <quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
@@ -349,7 +349,7 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
If you define it, you also need to define
<quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth_realm_avp"/>) and
- <quote>auth_username_avp</quote>
+ <quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
@@ -369,7 +369,7 @@ modparam("uac","auth_username_avp","$avp(i:11)")
</para>
<para><emphasis>
If you define it, you also need to define
- <quote>auth_password_avp</quote>
+ <quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth_realm_avp"/>) and
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth_username_avp"/>).
Module: kamailio
Branch: master
Commit: 6dd0f878cf066fd91a03d76b8d6248efb6370c22
URL: https://github.com/kamailio/kamailio/commit/6dd0f878cf066fd91a03d76b8d6248e…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-08-09T16:31:39+02:00
modules: readme files regenerated - uac ... [skip ci]
---
Modified: src/modules/uac/README
---
Diff: https://github.com/kamailio/kamailio/commit/6dd0f878cf066fd91a03d76b8d6248e…
Patch: https://github.com/kamailio/kamailio/commit/6dd0f878cf066fd91a03d76b8d6248e…
---
diff --git a/src/modules/uac/README b/src/modules/uac/README
index 9e688b3010..533d7b4183 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -411,8 +411,9 @@ modparam("uac","credential","username:domain:password")
This can be used if the realm upstream will be using is not known in
advance.
- If you define it, you also need to define “auth_username_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_username_avp”
+ (Section 3.10, “auth_username_avp (string)”) and “auth_username_avp”
+ (Section 3.11, “auth_password_avp (string)”).
Example 1.9. Set auth_realm_avp parameter
...
@@ -424,8 +425,9 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
The definition of an AVP that might contain the username to be used to
perform authentication.
- If you define it, you also need to define “auth_realm_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_realm_avp”
+ (Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
+ (Section 3.11, “auth_password_avp (string)”).
Example 1.10. Set auth_username_avp parameter
...
@@ -437,8 +439,9 @@ modparam("uac","auth_username_avp","$avp(i:11)")
The definition of an AVP that might contain the password to be used to
perform authentication.
- If you define it, you also need to define “auth_password_avp” (???) and
- “auth_username_avp” (???).
+ If you define it, you also need to define “auth_password_avp”
+ (Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
+ (Section 3.10, “auth_username_avp (string)”).
Example 1.11. Set auth_password_avp parameter
...
@@ -564,12 +567,15 @@ modparam("uac", "reg_gc_interval", 60)
Default socket to be used for generating registration requests and
sending requests with the function uac_req_send(). Useful e.g. when
- several public interfaces are available.
+ several public interfaces are available. A send socket in the $uac_reg
+ variable used together with the uac_req_send() function will override
+ this parameter.
By default no default socket is defined, the send socket is choosen
- from the tm module when the requests is send out. A send socket in the
- $uac_reg variable used together with the uac_req_send() function will
- override this parameter.
+ from the “tm” module when the requests is send out.
+
+ If you want to force a certain TCP port (e.g. 5060), you will need to
+ set the tcp_reuse_port=yes core parameter as well.
Example 1.21. Set the “default_socket” parameter
...