<!-- 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 -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] 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)
- [x] 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
- [x] Tested changes locally
- [x] Related to issue #4041
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4059
-- Commit Summary --
* cmake: Link internal libraries to core and remove them from modules
-- File Changes --
M src/CMakeLists.txt (4)
M src/lib/CMakeLists.txt (2)
M src/lib/ims/CMakeLists.txt (2)
M src/lib/srdb1/CMakeLists.txt (2)
M src/lib/srdb2/CMakeLists.txt (2)
M src/lib/trie/CMakeLists.txt (2)
M src/modules/acc/CMakeLists.txt (2)
M src/modules/alias_db/CMakeLists.txt (2)
M src/modules/auth_db/CMakeLists.txt (2)
M src/modules/avpops/CMakeLists.txt (1)
M src/modules/carrierroute/CMakeLists.txt (1)
M src/modules/cfg_db/CMakeLists.txt (1)
M src/modules/cnxcc/CMakeLists.txt (2)
M src/modules/cplc/CMakeLists.txt (2)
M src/modules/db2_ldap/CMakeLists.txt (1)
M src/modules/db2_ops/CMakeLists.txt (1)
M src/modules/db_berkeley/CMakeLists.txt (1)
M src/modules/db_cluster/CMakeLists.txt (1)
M src/modules/db_flatstore/CMakeLists.txt (1)
M src/modules/db_mongodb/CMakeLists.txt (1)
M src/modules/db_oracle/CMakeLists.txt (1)
M src/modules/db_perlvdb/CMakeLists.txt (1)
M src/modules/db_postgres/CMakeLists.txt (1)
M src/modules/db_redis/CMakeLists.txt (1)
M src/modules/db_sqlite/CMakeLists.txt (2)
M src/modules/db_text/CMakeLists.txt (2)
M src/modules/db_unixodbc/CMakeLists.txt (2)
M src/modules/dialog/CMakeLists.txt (1)
M src/modules/dialplan/CMakeLists.txt (1)
M src/modules/dispatcher/CMakeLists.txt (1)
M src/modules/dmq/CMakeLists.txt (1)
M src/modules/domain/CMakeLists.txt (1)
M src/modules/domainpolicy/CMakeLists.txt (1)
M src/modules/drouting/CMakeLists.txt (1)
M src/modules/group/CMakeLists.txt (1)
M src/modules/htable/CMakeLists.txt (1)
M src/modules/imc/CMakeLists.txt (1)
M src/modules/ims_auth/CMakeLists.txt (2)
M src/modules/ims_charging/CMakeLists.txt (1)
M src/modules/ims_dialog/CMakeLists.txt (1)
M src/modules/ims_diameter_server/CMakeLists.txt (1)
M src/modules/ims_icscf/CMakeLists.txt (1)
M src/modules/ims_ipsec_pcscf/CMakeLists.txt (1)
M src/modules/ims_isc/CMakeLists.txt (1)
M src/modules/ims_ocs/CMakeLists.txt (1)
M src/modules/ims_qos/CMakeLists.txt (1)
M src/modules/ims_qos_npn/CMakeLists.txt (1)
M src/modules/ims_usrloc_pcscf/CMakeLists.txt (1)
M src/modules/ims_usrloc_scscf/CMakeLists.txt (1)
M src/modules/kazoo/CMakeLists.txt (1)
M src/modules/keepalive/CMakeLists.txt (1)
M src/modules/lcr/CMakeLists.txt (1)
M src/modules/matrix/CMakeLists.txt (1)
M src/modules/mohqueue/CMakeLists.txt (1)
M src/modules/mqueue/CMakeLists.txt (1)
M src/modules/msilo/CMakeLists.txt (1)
M src/modules/mtree/CMakeLists.txt (1)
M src/modules/p_usrloc/CMakeLists.txt (1)
M src/modules/pdt/CMakeLists.txt (1)
M src/modules/permissions/CMakeLists.txt (1)
M src/modules/pipelimit/CMakeLists.txt (1)
M src/modules/prefix_route/CMakeLists.txt (1)
M src/modules/presence/CMakeLists.txt (1)
M src/modules/presence_xml/CMakeLists.txt (1)
M src/modules/pua/CMakeLists.txt (1)
M src/modules/rls/CMakeLists.txt (1)
M src/modules/rtpengine/CMakeLists.txt (1)
M src/modules/rtpproxy/CMakeLists.txt (1)
M src/modules/sca/CMakeLists.txt (1)
M src/modules/secfilter/CMakeLists.txt (1)
M src/modules/sipcapture/CMakeLists.txt (1)
M src/modules/siptrace/CMakeLists.txt (1)
M src/modules/siputils/CMakeLists.txt (1)
M src/modules/speeddial/CMakeLists.txt (1)
M src/modules/sqlops/CMakeLists.txt (1)
M src/modules/topos/CMakeLists.txt (1)
M src/modules/uac/CMakeLists.txt (1)
M src/modules/uid_auth_db/CMakeLists.txt (1)
M src/modules/uid_avp_db/CMakeLists.txt (1)
M src/modules/uid_domain/CMakeLists.txt (1)
M src/modules/uid_gflags/CMakeLists.txt (1)
M src/modules/uid_uri_db/CMakeLists.txt (1)
M src/modules/uri_db/CMakeLists.txt (1)
M src/modules/userblocklist/CMakeLists.txt (1)
M src/modules/usrloc/CMakeLists.txt (1)
M src/modules/utils/CMakeLists.txt (1)
M src/modules/xcap_client/CMakeLists.txt (1)
M src/modules/xcap_server/CMakeLists.txt (1)
M src/modules/xhttp/CMakeLists.txt (2)
M src/modules/xhttp_pi/CMakeLists.txt (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4059.patchhttps://github.com/kamailio/kamailio/pull/4059.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4059
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4059(a)github.com>
<!-- 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 -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] 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
- [x] 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
- [x] Tested changes locally
- [x] Related to issue #4019
#### Description
I assume that the crash #4019 happens, because of an issue in libcurl, namely in the `event_cb` function ([in this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…) kamailio removes the pointer to the `cell` object (which was attached to this `g->multi` curl descriptor earlier), and the `cell` object memory is released [at this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…. However, the crash happens when `event_cb` is called when `curl_multi_remove_handle` is called [at this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy….
In this fix `cell` object is retrieved from the corresponding CURL descriptor and then it's compared with the `cell` object passed to this callback.
With this change when this issue happens the `cell` object, which is retrieved from the corresponding CURL descriptor, is NULL pointer, because it was removed earlier [in this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…, so the crash should not appear.
However it might be fixed in other way, namely we may not to pass `cell` to the `event_cb` callback and always retrieve it from CURL descriptor. I would appreciate if developers comment that.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4020
-- Commit Summary --
* http_async_client: fixed crash on curl callback
-- File Changes --
M src/modules/http_async_client/http_multi.c (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4020.patchhttps://github.com/kamailio/kamailio/pull/4020.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4020
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4020(a)github.com>
Hello,
I am using letsencrypt cert and key and do not want to restart kamailio every 3 months to load new ones.
I know that there is: kamcmd tls.reload method but it has an error for me.
error: 500 - Error while fixing TLS configuration (consult server log)
I am checking the logs and see:
kamailio[3865480]: INFO: tls [tls_domain.c:345]: ksr_tls_fill_missing(): TLSs<default>: tls_method=3
kamailio[3865480]: INFO: tls [tls_domain.c:357]: ksr_tls_fill_missing(): TLSs<default>: certificate='/etc/kamailio/certs/my_cert.crt'
kamailio[3865480]: INFO: tls [tls_domain.c:364]: ksr_tls_fill_missing(): TLSs<default>: ca_list='(null)'
kamailio[3865480]: INFO: tls [tls_domain.c:371]: ksr_tls_fill_missing(): TLSs<default>: ca_path='(null)'
kamailio[3865480]: INFO: tls [tls_domain.c:378]: ksr_tls_fill_missing(): TLSs<default>: crl='(null)'
kamailio[3865480]: INFO: tls [tls_domain.c:382]: ksr_tls_fill_missing(): TLSs<default>: require_certificate=0
kamailio[3865480]: INFO: tls [tls_domain.c:390]: ksr_tls_fill_missing(): TLSs<default>: cipher_list='(null)'
kamailio[3865480]: INFO: tls [tls_domain.c:397]: ksr_tls_fill_missing(): TLSs<default>: private_key='/etc/kamailio/certs/private.key'
kamailio[3865480]: INFO: tls [tls_domain.c:401]: ksr_tls_fill_missing(): TLSs<default>: verify_certificate=0
kamailio[3865480]: INFO: tls [tls_domain.c:406]: ksr_tls_fill_missing(): TLSs<default>: verify_depth=9
kamailio[3865480]: INFO: tls [tls_domain.c:410]: ksr_tls_fill_missing(): TLSs<default>: verify_client=0
kamailio[3865480]: NOTICE: tls [tls_domain.c:1168]: ksr_tls_fix_domain(): registered server_name callback handler for socket [:0], server_name='<default>' ...
kamailio[3865480]: ERROR: tls [tls_domain.c:590]: load_cert(): TLSs<default>: Unable to load certificate file '/etc/kamailio/certs/my_cert.crt'
kamailio[3865480]: ERROR: tls [tls_util.h:49]: tls_err_ret(): load_cert:error:03000072:digital envelope routines::decode error (sni: unknown)
kamailio[3865480]: ERROR: tls [tls_util.h:49]: tls_err_ret(): load_cert:error:0A00018F:SSL routines::ee key too small (sni: unknown)
Any advice ?
It's interesting that there are not any TLS errors in case I restart kamailio. I can make TLS calls without problems.
deb 12.5
version: kamailio 5.7.4 (x86_64/linux)
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4033
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4033(a)github.com>
Module: kamailio
Branch: master
Commit: 8e398b8675079e1baac7c7575e70283175cdebe2
URL: https://github.com/kamailio/kamailio/commit/8e398b8675079e1baac7c7575e70283…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-12-09T19:04:25+01:00
lib/srdb1: new and free connection callbacks expect one parameter
- new connection is executetd with a database id and free connection
with a pool con
- compiler warnings:
src/lib/srdb1/db.c:322:23: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
322 | con = new_connection(id);
src/lib/srdb1/db.c:361:18: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
361 | free_connection(con);
---
Modified: src/lib/srdb1/db.c
Modified: src/lib/srdb1/db.h
---
Diff: https://github.com/kamailio/kamailio/commit/8e398b8675079e1baac7c7575e70283…
Patch: https://github.com/kamailio/kamailio/commit/8e398b8675079e1baac7c7575e70283…
---
diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c
index b13d87c692b..77dea84df52 100644
--- a/src/lib/srdb1/db.c
+++ b/src/lib/srdb1/db.c
@@ -270,7 +270,7 @@ int db_bind_mod(const str *mod, db_func_t *mydbf)
* Initialize database module
* \note No function should be called before this
*/
-db1_con_t *db_do_init(const str *url, void *(*new_connection)())
+db1_con_t *db_do_init(const str *url, void *(*new_connection)(struct db_id *))
{
return db_do_init2(url, *new_connection, DB_POOLING_PERMITTED);
}
@@ -280,8 +280,8 @@ db1_con_t *db_do_init(const str *url, void *(*new_connection)())
* Initialize database module
* \note No function should be called before this
*/
-db1_con_t *db_do_init2(
- const str *url, void *(*new_connection)(), db_pooling_t pooling)
+db1_con_t *db_do_init2(const str *url, void *(*new_connection)(struct db_id *),
+ db_pooling_t pooling)
{
struct db_id *id;
void *con;
@@ -347,7 +347,7 @@ db1_con_t *db_do_init2(
* Shut down database module
* \note No function should be called after this
*/
-void db_do_close(db1_con_t *_h, void (*free_connection)())
+void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *))
{
struct pool_con *con;
diff --git a/src/lib/srdb1/db.h b/src/lib/srdb1/db.h
index 248647ecd07..a9538f6b9ca 100644
--- a/src/lib/srdb1/db.h
+++ b/src/lib/srdb1/db.h
@@ -48,6 +48,8 @@
#include "db_cap.h"
#include "db_con.h"
#include "db_row.h"
+#include "db_id.h"
+#include "db_pool.h"
#include "db_pooling.h"
#include "db_locking.h"
@@ -464,7 +466,7 @@ int db_bind_mod(const str *mod, db_func_t *dbf);
* \return returns a pointer to the db1_con_t representing the connection if it was
successful, otherwise 0 is returned.
*/
-db1_con_t *db_do_init(const str *url, void *(*new_connection)());
+db1_con_t *db_do_init(const str *url, void *(*new_connection)(struct db_id *));
/**
@@ -478,8 +480,8 @@ db1_con_t *db_do_init(const str *url, void *(*new_connection)());
* \return returns a pointer to the db1_con_t representing the connection if it was
successful, otherwise 0 is returned.
*/
-db1_con_t *db_do_init2(
- const str *url, void *(*new_connection)(), db_pooling_t pooling);
+db1_con_t *db_do_init2(const str *url, void *(*new_connection)(struct db_id *),
+ db_pooling_t pooling);
/**
@@ -490,7 +492,7 @@ db1_con_t *db_do_init2(
* \param _h database connection handle
* \param (*free_connection) Pointer to the db specific free_connection method
*/
-void db_do_close(db1_con_t *_h, void (*free_connection)());
+void db_do_close(db1_con_t *_h, void (*free_connection)(struct pool_con *));
/**