Module: kamailio
Branch: master
Commit: 9ea86b94b2e26b21f4e3041e6298fd475797ceb3
URL: https://github.com/kamailio/kamailio/commit/9ea86b94b2e26b21f4e3041e6298fd4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-08T10:42:59+02:00
core: mem - new functions for pkg/shm - mallocxz() and reallocxf()
- pkg_mallocxz(size) / shm_mallocxz(size) - same as the corresponding
malloc function, but the allocated buffer is filled with 0. It is
equivalent of { p=malloc(size); if(p) memset(p, 0, size); }
- pkg_reallocxf(p, size)/shm_reallocxf(p, size) - same as the
corresponding realloc functions, but the old pointer is always freed,
even if the realloc operation fails. The BSDs have reallocf()
---
Modified: src/core/mem/memapi.h
Modified: src/core/mem/pkg.h
Modified: src/core/mem/shm.h
---
Diff: https://github.com/kamailio/kamailio/commit/9ea86b94b2e26b21f4e3041e6298fd4…
Patch: https://github.com/kamailio/kamailio/commit/9ea86b94b2e26b21f4e3041e6298fd4…
Module: kamailio
Branch: master
Commit: 5f0792e7ee985b80601e6f952269bc48031e6356
URL: https://github.com/kamailio/kamailio/commit/5f0792e7ee985b80601e6f952269bc4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-07T11:31:22+02:00
modules: readme files regenerated - topos ... [skip ci]
---
Modified: src/modules/topos/README
---
Diff: https://github.com/kamailio/kamailio/commit/5f0792e7ee985b80601e6f952269bc4…
Patch: https://github.com/kamailio/kamailio/commit/5f0792e7ee985b80601e6f952269bc4…
---
diff --git a/src/modules/topos/README b/src/modules/topos/README
index 3e42389014..cf4bce61f6 100644
--- a/src/modules/topos/README
+++ b/src/modules/topos/README
@@ -32,6 +32,11 @@ Daniel-Constantin Mierla
3.5. branch_expire (int)
3.6. dialog_expire (int)
3.7. clean_interval (int)
+ 3.8. event_callback (str)
+
+ 4. Event Routes
+
+ 4.1. event_route[topos:msg-outgoing]
List of Examples
@@ -42,6 +47,8 @@ Daniel-Constantin Mierla
1.5. Set branch_expire parameter
1.6. Set dialog_expire parameter
1.7. Set clean_interval parameter
+ 1.8. Set event_callback parameter
+ 1.9. Usage of event_route[topos:msg-outgoing]
Chapter 1. Admin Guide
@@ -62,6 +69,11 @@ Chapter 1. Admin Guide
3.5. branch_expire (int)
3.6. dialog_expire (int)
3.7. clean_interval (int)
+ 3.8. event_callback (str)
+
+ 4. Event Routes
+
+ 4.1. event_route[topos:msg-outgoing]
1. Overview
@@ -102,6 +114,7 @@ Chapter 1. Admin Guide
3.5. branch_expire (int)
3.6. dialog_expire (int)
3.7. clean_interval (int)
+ 3.8. event_callback (str)
3.1. storage (str)
@@ -188,3 +201,49 @@ modparam("topos", "dialog_expire", 3600)
...
modparam("topos", "clean_interval", 30)
...
+
+3.8. event_callback (str)
+
+ The name of the function in the KEMI configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead of
+ event_route[...] blocks.
+
+ The function receives a string parameter with the name of the event.
+
+ Default value is 'empty' (no function is executed for events).
+
+ Example 1.8. Set event_callback parameter
+...
+modparam("topos", "event_callback", "ksr_topos_event")
+...
+-- event callback function implemented in Lua
+function ksr_topos_event(evname)
+ KSR.info("===== topos module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+
+4. Event Routes
+
+ 4.1. event_route[topos:msg-outgoing]
+
+4.1. event_route[topos:msg-outgoing]
+
+ It is executed before doing topology stripping processing for an
+ outgoing SIP message. If 'drop' is executed inside the event route,
+ then the module skips doing the topology hiding.
+
+ Inside the event route the variables $sndto(ip), $sndto(port) and
+ $sndto(proto) point to the destination. The SIP message is not the one
+ to be sent out, but an internally generated one at startup, to avoid
+ reparsing the outgoing SIP message for the cases when topology hiding
+ is not wanted.
+
+ Example 1.9. Usage of event_route[topos:msg-outgoing]
+...
+event_route[topos:msg-outgoing] {
+ if($sndto(ip)=="10.1.1.10") {
+ drop;
+ }
+}
+...
Module: kamailio
Branch: master
Commit: f6dc87151138e600d593a345109ba2028d2dc16f
URL: https://github.com/kamailio/kamailio/commit/f6dc87151138e600d593a345109ba20…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-07T11:23:53+02:00
topos: docs for event_callback param and event_route[topos:msg-outgoing]
---
Modified: src/modules/topos/doc/topos_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f6dc87151138e600d593a345109ba20…
Patch: https://github.com/kamailio/kamailio/commit/f6dc87151138e600d593a345109ba20…
---
diff --git a/src/modules/topos/doc/topos_admin.xml b/src/modules/topos/doc/topos_admin.xml
index 77de4b8cbd..bda8ab766d 100644
--- a/src/modules/topos/doc/topos_admin.xml
+++ b/src/modules/topos/doc/topos_admin.xml
@@ -223,7 +223,66 @@ modparam("topos", "clean_interval", 30)
</programlisting>
</example>
</section>
-
+ <section id="topos.p.event_callback">
+ <title><varname>event_callback</varname> (str)</title>
+ <para>
+ The name of the function in the KEMI configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead
+ of event_route[...] blocks.
+ </para>
+ <para>
+ The function receives a string parameter with the name of the event.
+ </para>
+ <para>
+ <emphasis>
+ Default value is 'empty' (no function is executed for events).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>event_callback</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("topos", "event_callback", "ksr_topos_event")
+...
+-- event callback function implemented in Lua
+function ksr_topos_event(evname)
+ KSR.info("===== topos module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
+ </section>
+ <section>
+ <title>Event Routes</title>
+ <section>
+ <title>event_route[topos:msg-outgoing]</title>
+ <para>
+ It is executed before doing topology stripping processing for an outgoing
+ SIP message. If 'drop' is executed inside the event route, then the
+ module skips doing the topology hiding.
+ </para>
+ <para>
+ Inside the event route the variables $sndto(ip), $sndto(port) and
+ $sndto(proto) point to the destination. The SIP message is not the one
+ to be sent out, but an internally generated one at startup, to avoid
+ reparsing the outgoing SIP message for the cases when topology hiding
+ is not wanted.
+ </para>
+ <example>
+ <title>Usage of event_route[topos:msg-outgoing]</title>
+ <programlisting format="linespecific">
+...
+event_route[topos:msg-outgoing] {
+ if($sndto(ip)=="10.1.1.10") {
+ drop;
+ }
+}
+...
+</programlisting>
+ </example>
+ </section>
</section>
</chapter>
Hi,
I think, I found one issue with Daniel's new (great) TOPOS module:
I've configured it on my Edge-Proxy (aka. Proxy-CSCF) as a replacement
for an SBC and I ran into a strange issue.
Everything works fine, except in one Scenario:
Both A and B Party are registered using the same Proxy, so TOPOS is
triggered twice: On the originating Leg and on the terminating Leg.
It works properly, if I'm just having one Leg on the Proxy (either
because it's going to/coming from the Breakout Gateway or because the
B-Party registered using a different Proxy).
It appears to happen only, if the B-Party has a public IP, if no NAT
involved (Wtf?!?), it actually happened initially when I called my
mother.
I've looked through the source-code but couldn't find a proper
solution. Anyone an idea?
Thanks,
Carsten
P.S: Please find attached a full trace of such call and the according
database entries
--
Carsten Bock
CEO (Geschäftsführer)
ng-voice GmbH
Millerntorplatz 1
20359 Hamburg / Germany
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Office +49 40 5247593-40
Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
Module: kamailio
Branch: master
Commit: 20af8da05513345ccb3d372e097c71a115ebe5a7
URL: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-04T15:16:23+02:00
modules: readme files regenerated - websocket ... [skip ci]
---
Modified: src/modules/websocket/README
---
Diff: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
Patch: https://github.com/kamailio/kamailio/commit/20af8da05513345ccb3d372e097c71a…
---
diff --git a/src/modules/websocket/README b/src/modules/websocket/README
index 3541db94fb..158248654a 100644
--- a/src/modules/websocket/README
+++ b/src/modules/websocket/README
@@ -33,6 +33,7 @@ Peter Dunkley
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
5. Functions
@@ -68,10 +69,11 @@ Peter Dunkley
1.8. Set sub_protocols parameter
1.9. Set cors_mode parameter
1.10. Set verbose_list parameter
- 1.11. ws_handle_handshake usage
- 1.12. ws_close usage
- 1.13. event_route[websocket:closed] usage
- 1.14. $ws_conid usage
+ 1.11. Set event_callback parameter
+ 1.12. ws_handle_handshake usage
+ 1.13. ws_close usage
+ 1.14. event_route[websocket:closed] usage
+ 1.15. $ws_conid usage
Chapter 1. Admin Guide
@@ -99,6 +101,7 @@ Chapter 1. Admin Guide
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
5. Functions
@@ -341,6 +344,7 @@ onreply_route[WS_REPLY] {
4.6. sub_protocols (integer)
4.7. cors_mode (integer)
4.8. verbose_list (int)
+ 4.9. event_callback (str)
4.1. keepalive_mechanism (integer)
@@ -457,6 +461,28 @@ modparam("websocket", "cors_mode", 2)
modparam("websocket", "verbose_list", 1)
...
+4.9. event_callback (str)
+
+ The name of the function in the kemi configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead of
+ event_route[...] blocks specific for websocket module.
+
+ The function has one string parameter, the value is the name of the
+ event_route block, respectively "websocket:closed".
+
+ Default value is 'empty' (no function is executed for events).
+
+ Example 1.11. Set event_callback parameter
+...
+modparam("websocket", "event_callback", "ksr_websocket_event")
+...
+-- event callback function implemented in Lua
+function ksr_websocket_event(evname)
+ KSR.info("===== websocket module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+
5. Functions
5.1. ws_handle_handshake()
@@ -476,7 +502,7 @@ Note
This function returns 0, stopping all further processing of the
request, when there is a problem.
- Example 1.11. ws_handle_handshake usage
+ Example 1.12. ws_handle_handshake usage
...
ws_handle_handshake();
...
@@ -501,7 +527,7 @@ Note
This function can be used from ANY_ROUTE.
- Example 1.12. ws_close usage
+ Example 1.13. ws_close usage
...
ws_close(4000, "Because I say so");
...
@@ -615,7 +641,7 @@ kamcmd ws.enable
connection closes. The connection may be identified using the the $si
and $sp pseudo-variables.
- Example 1.13. event_route[websocket:closed] usage
+ Example 1.14. event_route[websocket:closed] usage
...
event_route[websocket:closed] {
xlog("L_INFO", "WebSocket connection from $si:$sp has closed\n");
@@ -631,7 +657,7 @@ event_route[websocket:closed] {
Connection id of closed websocket connection. Can only be used in
websocket:closed event route.
- Example 1.14. $ws_conid usage
+ Example 1.15. $ws_conid usage
...
event_route[websocket:closed] {
xlog("L_INFO", "WebSocket connection with id $ws_conid has closed\n");
Module: kamailio
Branch: master
Commit: 921c2f6a53108ac4ddc3e262a479a46650412bce
URL: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-04T15:10:50+02:00
websocket: documentation for event_callback parameter
---
Modified: src/modules/websocket/doc/websocket_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
Patch: https://github.com/kamailio/kamailio/commit/921c2f6a53108ac4ddc3e262a479a46…
---
diff --git a/src/modules/websocket/doc/websocket_admin.xml b/src/modules/websocket/doc/websocket_admin.xml
index c887c05158..055498862e 100644
--- a/src/modules/websocket/doc/websocket_admin.xml
+++ b/src/modules/websocket/doc/websocket_admin.xml
@@ -445,6 +445,37 @@ modparam("websocket", "verbose_list", 1)
</programlisting>
</example>
</section>
+ <section id="websocket.p.event_callback">
+ <title><varname>event_callback</varname> (str)</title>
+ <para>
+ The name of the function in the kemi configuration file (embedded
+ scripting language such as Lua, Python, ...) to be executed instead
+ of event_route[...] blocks specific for websocket module.
+ </para>
+ <para>
+ The function has one string parameter, the value is the name of
+ the event_route block, respectively "websocket:closed".
+ </para>
+ <para>
+ <emphasis>
+ Default value is 'empty' (no function is executed for events).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>event_callback</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("websocket", "event_callback", "ksr_websocket_event")
+...
+-- event callback function implemented in Lua
+function ksr_websocket_event(evname)
+ KSR.info("===== websocket module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
</section>
Module: kamailio
Branch: master
Commit: 61d72c90a1a3fe34aad3cedb87a3e68529be34ac
URL: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-03T21:31:22+02:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
Patch: https://github.com/kamailio/kamailio/commit/61d72c90a1a3fe34aad3cedb87a3e68…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 4be5d66028..6c35f29858 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -911,6 +911,10 @@ end
For example, 100 calls in 3-hosts group with rweight params
1/2/1 will be distributed as 25/50/25. After third host
failing distribution will be changed to 33/67/0.
+ + “12” - dispatch to all destination in setid at once (parallel
+ forking). Note that the AVPs are no longer set with the values
+ of the destination records, no re-routing making sense in this
+ case.
+ “X” - if the algorithm is not implemented, the first entry in
set is chosen.
* limit - the maximum number of items to be stored in AVP list for
Module: kamailio
Branch: master
Commit: e84ee3becbf59a5afc63510596cd62bae36d1962
URL: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-03T19:05:59+02:00
dispatcher: documentation for parallel dispatching algorithm
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
Patch: https://github.com/kamailio/kamailio/commit/e84ee3becbf59a5afc63510596cd62b…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index b5315acc2d..a0d35eec8a 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1040,6 +1040,14 @@ end
</listitem>
<listitem>
<para>
+ <quote>12</quote> - dispatch to all destination in setid at
+ once (parallel forking). Note that the AVPs are no longer set
+ with the values of the destination records, no re-routing
+ making sense in this case.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<quote>X</quote> - if the algorithm is not implemented, the
first entry in set is chosen.
</para>
Dear Team,
Any one pls help me , i have been struck with this more than 2 months , i have keep on changing the kamailio.cfg but nothing has worked .
Initially i had plan to user captagent but unfortunately i couldn't run in CentOS since its failing in init procedure , because document which is provided in github is only for other OS .
so planned to use kamailio as capture server .
When ever i tried to run sipgrep , its showing data running on my server .
And when i used command kamailio -c , i can see below interface is listening , but its not capturing any data and sending to mysql .
root@localhost kamailio]# kamailio -c
0(6624) WARNING: <core> [ppcfg.c:221]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
Listening on
udp: 172.16.5.158:9060
Aliases:
udp: localhost.localdom:9060
udp: localhost.localdomain:9060
And My sql is running fine without any issue .
Any one can pls audit my configuration and advise me .
because am New to Centos and homer .
Thanks in advance
--
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/issues/1202
### Description
In the documentation documentation for module pipelimit https://www.kamailio.org/docs/modules/4.2.x/modules/ratelimit.html
has an error in example:
```# perform pipe match for authenticated user
$var(limit) = 20;
if (!pl_check("$au", "traildrop", "$var(limit)")) {
pl_drop();
exit;
}
```
If write algorithm "traildrop" in function pl_check, you every execution will get return code -2 and pipe not will be created.
### Possible Solutions
Change string "traildrop" on "TAILDROP"
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio 4.2.3
```
--
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/issues/1201
Module: kamailio
Branch: master
Commit: d302422982aab79ec9af9b9d54d33dbf98dc7b63
URL: https://github.com/kamailio/kamailio/commit/d302422982aab79ec9af9b9d54d33db…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-02T10:00:53+02:00
tsilo: added section ids in docs
---
Modified: src/modules/tsilo/doc/tsilo_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/d302422982aab79ec9af9b9d54d33db…
Patch: https://github.com/kamailio/kamailio/commit/d302422982aab79ec9af9b9d54d33db…
---
diff --git a/src/modules/tsilo/doc/tsilo_admin.xml b/src/modules/tsilo/doc/tsilo_admin.xml
index 457aa7a219..e6cfe9b155 100644
--- a/src/modules/tsilo/doc/tsilo_admin.xml
+++ b/src/modules/tsilo/doc/tsilo_admin.xml
@@ -74,7 +74,7 @@
</section>
<section>
<title>Parameters</title>
- <section>
+ <section id="tsilo.p.hash_size">
<title><varname>hash_size</varname> (integer)</title>
<para>
The size of the hash table internally used to keep the transaction. A
@@ -97,7 +97,7 @@ modparam("tsilo", "hash_size", 1024)
</example>
</section>
- <section>
+ <section id="tsilo.p.use_domain">
<title><varname>use_domain</varname> (integer)</title>
<para>
Specify if the domain part of the URI should be also saved and used for
@@ -122,7 +122,7 @@ modparam("tsilo", "use_domain", 1)
<section>
<title>Functions</title>
- <section>
+ <section id="tsilo.f.ts_store">
<title><function moreinfo="none">ts_store([uri])</function></title>
<para>
The method stores uri, tindex and tlabel of the current transaction. If
@@ -146,7 +146,7 @@ if (is_method("INVITE")) {
</programlisting>
</example>
</section>
- <section>
+ <section id="tsilo.f.ts_append">
<title><function moreinfo="none">ts_append(domain, ruri)</function></title>
<para>
The method add branches to all the stored transactions for the &sip;
@@ -184,7 +184,7 @@ if (is_method("REGISTER")) {
</programlisting>
</example>
</section>
- <section>
+ <section id="tsilo.f.ts_append_to">
<title><function moreinfo="none">ts_append_to(tindex, tlabel, domain, [uri])</function></title>
<para>
The method add branches to the transaction identified by tindex and tlabel,
@@ -238,7 +238,7 @@ if (is_method("REGISTER")) {
<section>
<title>RPC Commands</title>
- <section>
+ <section id="tsilo.rpc.ts.dump">
<title><varname>ts.dump</varname></title>
<para>Dumps the content of the TSILO table</para>
<para>Name: <emphasis>ts.dump</emphasis></para>
@@ -247,7 +247,7 @@ if (is_method("REGISTER")) {
kamcmd ts.dump
</programlisting>
</section>
- <section>
+ <section id="tsilo.rpc.ts.lookup">
<title><varname>ts.lookup</varname></title>
<para>Dumps the transactions stored for the given RURI</para>
<para>Name: <emphasis>ts.lookup</emphasis></para>
@@ -259,31 +259,31 @@ if (is_method("REGISTER")) {
</section>
<section>
<title>Statistics</title>
- <section>
+ <section id="tsilo.stat.stored_ruris">
<title><varname>stored_ruris</varname></title>
<para>
Number of ruris currently stored in the TSILO table.
</para>
</section>
- <section>
+ <section id="tsilo.stat.stored_transactions">
<title><varname>stored_transactions</varname></title>
<para>
Number of transactions currently stored in the TSILO table.
</para>
</section>
- <section>
+ <section id="tsilo.stat.added_branches">
<title><varname>added_branches</varname></title>
<para>
Total number of added branches from the startup.
</para>
</section>
- <section>
+ <section id="tsilo.stat.total_ruris">
<title><varname>total_ruris</varname></title>
<para>
Total number of stored ruris from the startup.
</para>
</section>
- <section>
+ <section id="tsilo.stat.total_transactions">
<title><varname>total_transactions</varname></title>
<para>
Total number of stored transactions from the startup.
Module: kamailio
Branch: 4.4
Commit: c5657b7386f8be722e3d87c70b9e049d2b843c0d
URL: https://github.com/kamailio/kamailio/commit/c5657b7386f8be722e3d87c70b9e049…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-02T12:56:03+02:00
tls: explicit libssl v1.1+ cleanup when module is destroyed
- OPENSSL_cleanup() explicitely executed for libssl v1.1+ when tls
module is destroyed, to avoid being executed again on final exit
(due to atexit() callback), because at that moment shared memory
is already destroyed and attempts to access the locals will result
in cored dump
- retported by Victor Seva, GH #1189
(cherry picked from commit 00eb71da83347c9d2ea74feacec9c955f7b2a2e6)
(cherry picked from commit 071b85f66cabaa3a705a014b26b7c1eb31029b26)
---
Modified: modules/tls/tls_init.c
---
Diff: https://github.com/kamailio/kamailio/commit/c5657b7386f8be722e3d87c70b9e049…
Patch: https://github.com/kamailio/kamailio/commit/c5657b7386f8be722e3d87c70b9e049…
---
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index 133bc7fc83..1ce9d716a5 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -778,4 +778,10 @@ void destroy_tls_h(void)
tls_destroy_cfg();
tls_destroy_locks();
tls_ct_wq_destroy();
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L
+ /* explicit execution of libssl cleanup to avoid being executed again
+ * by atexit(), when shm is gone */
+ DBG("executing openssl v1.1+ cleanup\n");
+ OPENSSL_cleanup();
+#endif
}
Module: kamailio
Branch: 5.0
Commit: 071b85f66cabaa3a705a014b26b7c1eb31029b26
URL: https://github.com/kamailio/kamailio/commit/071b85f66cabaa3a705a014b26b7c1e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-02T10:02:45+02:00
tls: explicit libssl v1.1+ cleanup when module is destroyed
- OPENSSL_cleanup() explicitely executed for libssl v1.1+ when tls
module is destroyed, to avoid being executed again on final exit
(due to atexit() callback), because at that moment shared memory
is already destroyed and attempts to access the locals will result
in cored dump
- retported by Victor Seva, GH #1189
(cherry picked from commit 00eb71da83347c9d2ea74feacec9c955f7b2a2e6)
---
Modified: src/modules/tls/tls_init.c
---
Diff: https://github.com/kamailio/kamailio/commit/071b85f66cabaa3a705a014b26b7c1e…
Patch: https://github.com/kamailio/kamailio/commit/071b85f66cabaa3a705a014b26b7c1e…
---
diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c
index 5d977fc810..b12209a0cd 100644
--- a/src/modules/tls/tls_init.c
+++ b/src/modules/tls/tls_init.c
@@ -778,4 +778,10 @@ void destroy_tls_h(void)
tls_destroy_cfg();
tls_destroy_locks();
tls_ct_wq_destroy();
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L
+ /* explicit execution of libssl cleanup to avoid being executed again
+ * by atexit(), when shm is gone */
+ DBG("executing openssl v1.1+ cleanup\n");
+ OPENSSL_cleanup();
+#endif
}
Module: kamailio
Branch: master
Commit: 00eb71da83347c9d2ea74feacec9c955f7b2a2e6
URL: https://github.com/kamailio/kamailio/commit/00eb71da83347c9d2ea74feacec9c95…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-02T09:54:18+02:00
tls: explicit libssl v1.1+ cleanup when module is destroyed
- OPENSSL_cleanup() explicitely executed for libssl v1.1+ when tls
module is destroyed, to avoid being executed again on final exit
(due to atexit() callback), because at that moment shared memory
is already destroyed and attempts to access the locals will result
in cored dump
- retported by Victor Seva, GH #1189
---
Modified: src/modules/tls/tls_init.c
---
Diff: https://github.com/kamailio/kamailio/commit/00eb71da83347c9d2ea74feacec9c95…
Patch: https://github.com/kamailio/kamailio/commit/00eb71da83347c9d2ea74feacec9c95…
---
diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c
index 6d78c37551..054d687e9c 100644
--- a/src/modules/tls/tls_init.c
+++ b/src/modules/tls/tls_init.c
@@ -847,4 +847,10 @@ void destroy_tls_h(void)
tls_destroy_cfg();
tls_destroy_locks();
tls_ct_wq_destroy();
+#if OPENSSL_VERSION_NUMBER >= 0x010100000L
+ /* explicit execution of libssl cleanup to avoid being executed again
+ * by atexit(), when shm is gone */
+ DBG("executing openssl v1.1+ cleanup\n");
+ OPENSSL_cleanup();
+#endif
}