<!-- 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 #3823
#### Description
<!-- Describe your changes in detail -->
This PR aims to implement what was discussed in [mailing list](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-dev@lists.kama… regarding some `tls.reload` and increasing memory usage.
It adds a new parameter `enable_shared_ctx` in `tls` module that if set to 0, preserves the old behavior and if set to 1 (other than 0 tbh), it creates a single SSL context that is being shared. This have the effect of using way less memory when initialized as well, but also minimizes (can't say it fixes the problem) the `tls.reload` memory increase.
I have also added a small markdown (comparison.md) file, where some comparisons where made between enabled/disabled shared context and with/without CA file (where the initial problem was occurring by the reporter).
Feedback would be necessary to verify whether this patch, acts as expected and kamailio works as intented.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3972
-- Commit Summary --
* tls: Add parameter for shared contexts
* tls: Comparison for enable_shared_ctx
-- File Changes --
A comparison.md (15)
M src/modules/tls/tls_domain.c (172)
M src/modules/tls/tls_mod.c (11)
M src/modules/tls/tls_mod.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3972.patchhttps://github.com/kamailio/kamailio/pull/3972.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3972
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3972(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
- [ ] 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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Added support for KEMI API in PDB module.
Here is example usage in KEMI Python.
```
if not (KSR.pdb.pdb_query(KSR.pv.gete("$var(pdb_user)"), "$avp(carrier_id)") > 0):
KSR.err(F"""[{HERE()}]: PDB query failed for user '{KSR.pv.get("$var(pdb_user)")}' \n""")
else:
KSR.info(F""" PDB query return carrier_id = '{KSR.pv.getw("$avp(carrier_id)")}' \n""")
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4265
-- Commit Summary --
* pdb: added KEMI support for PDB module
-- File Changes --
M src/modules/pdb/pdb.c (339)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4265.patchhttps://github.com/kamailio/kamailio/pull/4265.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4265
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4265(a)github.com>
ovedeneev created an issue (kamailio/kamailio#4187)
### Description
[tcp_send_timeout](https://www.kamailio.org/wikidocs/cookbooks/5.8.x/core/#t… option does not apply for outbound connections.
#### Reproduction
1. Establish TCP OPTIONS between Kamailio and target node.
2. On target node block incoming traffic from Kamailio node using iptables.
3. Notice on Kamailio node that TCP retransmission packets don't follow tcp_send_timeout settings, instead they fall back to kernel's net.ipv4.tcp_retries2 settings.
### Additional Information
* **Kamailio Version**
```
# kamailio -V
version: kamailio 5.8.2 (aarch64/linux) 446039
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 446039
compiled on 14:32:09 Nov 14 2024 with gcc 8.5.0
```
* **Operating System**:
```
Linux xxx 4.18.0-553.6.1.el8.aarch64 #1 SMP Thu May 30 04:10:32 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4187
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4187(a)github.com>
#### Pre-Submission Checklist
- [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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
As a local IP address for TCP sending operation the Kamailio service is taking the same network_interface/IP_address, which is used by the service for TCP listening.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3925
-- Commit Summary --
* core: local TCP socket is bound on listening address
-- File Changes --
M src/core/tcp_main.c (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3925.patchhttps://github.com/kamailio/kamailio/pull/3925.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3925
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3925(a)github.com>
sergey-safarov created an issue (kamailio/kamailio#4264)
On `alpine:edge` upgraded `libjwt-dev` from `1.17.2-r0` to `3.2.1-r0` and on now present this error in the build log.
```
make[2]: --libs: No such file or directory
make[2]: --libs: No such file or directory
CC (cc) [M jwt.so] jwt_mod.o
jwt_mod.c: In function 'ki_jwt_generate_hdrs':
jwt_mod.c:215:17: error: implicit declaration of function 'jwt_free_str'; did you mean 'jwt_alg_str'? [-Wimplicit-function-declaration]
215 | jwt_free_str(_jwt_result.s);
| ^~~~~~~~~~~~
| jwt_alg_str
jwt_mod.c:275:15: error: implicit declaration of function 'jwt_new' [-Wimplicit-function-declaration]
275 | ret = jwt_new(&jwt);
| ^~~~~~~
jwt_mod.c:283:15: error: implicit declaration of function 'jwt_add_grant_int' [-Wimplicit-function-declaration]
283 | ret = jwt_add_grant_int(jwt, "iat", iat);
| ^~~~~~~~~~~~~~~~~
jwt_mod.c:293:39: error: implicit declaration of function 'jwt_add_grant' [-Wimplicit-function-declaration]
293 | ret = jwt_add_grant(jwt, pit->name.s, pit->body.s);
| ^~~~~~~~~~~~~
jwt_mod.c:311:39: error: implicit declaration of function 'jwt_add_header' [-Wimplicit-function-declaration]
311 | ret = jwt_add_header(jwt, header->name.s, header->body.s);
| ^~~~~~~~~~~~~~
jwt_mod.c:313:39: error: implicit declaration of function 'jwt_add_header_int'; did you mean 'jwt_header_get'? [-Wimplicit-function-declaration]
313 | ret = jwt_add_header_int(jwt, header->name.s, lval);
| ^~~~~~~~~~~~~~~~~~
| jwt_header_get
jwt_mod.c:324:15: error: implicit declaration of function 'jwt_set_alg'; did you mean 'jwt_get_alg'? [-Wimplicit-function-declaration]
324 | ret = jwt_set_alg(jwt, valg, (unsigned char *)kdata.s, (size_t)kdata.len);
| ^~~~~~~~~~~
| jwt_get_alg
jwt_mod.c:330:25: error: implicit declaration of function 'jwt_encode_str' [-Wimplicit-function-declaration]
330 | _jwt_result.s = jwt_encode_str(jwt);
| ^~~~~~~~~~~~~~
jwt_mod.c:330:23: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
330 | _jwt_result.s = jwt_encode_str(jwt);
| ^
jwt_mod.c:337:9: error: implicit declaration of function 'jwt_free'; did you mean 'jwks_free'? [-Wimplicit-function-declaration]
337 | jwt_free(jwt);
| ^~~~~~~~
| jwks_free
jwt_mod.c: In function 'ki_jwt_verify_key':
jwt_mod.c:443:9: error: unknown type name 'jwt_valid_t'; did you mean 'jwt_value_t'?
443 | jwt_valid_t *jwt_valid = NULL;
| ^~~~~~~~~~~
| jwt_value_t
jwt_mod.c:477:15: error: implicit declaration of function 'jwt_valid_new' [-Wimplicit-function-declaration]
477 | ret = jwt_valid_new(&jwt_valid, valg);
| ^~~~~~~~~~~~~
jwt_mod.c:484:9: error: implicit declaration of function 'jwt_valid_set_headers' [-Wimplicit-function-declaration]
484 | jwt_valid_set_headers(jwt_valid, 1);
| ^~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:485:9: error: implicit declaration of function 'jwt_valid_set_now' [-Wimplicit-function-declaration]
485 | jwt_valid_set_now(jwt_valid, iat);
| ^~~~~~~~~~~~~~~~~
jwt_mod.c:492:39: error: implicit declaration of function 'jwt_valid_add_grant' [-Wimplicit-function-declaration]
492 | ret = jwt_valid_add_grant(jwt_valid, pit->name.s, pit->body.s);
| ^~~~~~~~~~~~~~~~~~~
jwt_mod.c:494:39: error: implicit declaration of function 'jwt_valid_add_grant_int' [-Wimplicit-function-declaration]
494 | ret = jwt_valid_add_grant_int(jwt_valid, pit->name.s, lval);
| ^~~~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:505:15: error: implicit declaration of function 'jwt_decode' [-Wimplicit-function-declaration]
505 | ret = jwt_decode(
| ^~~~~~~~~~
jwt_mod.c:511:22: error: implicit declaration of function 'jwt_validate' [-Wimplicit-function-declaration]
511 | if((jwtret = jwt_validate(jwt, jwt_valid)) != JWT_VALIDATION_SUCCESS) {
| ^~~~~~~~~~~~
jwt_mod.c:511:55: error: 'JWT_VALIDATION_SUCCESS' undeclared (first use in this function)
511 | if((jwtret = jwt_validate(jwt, jwt_valid)) != JWT_VALIDATION_SUCCESS) {
| ^~~~~~~~~~~~~~~~~~~~~~
jwt_mod.c:511:55: note: each undeclared identifier is reported only once for each function it appears in
jwt_mod.c:512:38: error: implicit declaration of function 'jwt_valid_get_status' [-Wimplicit-function-declaration]
512 | _jwt_verify_status = jwt_valid_get_status(jwt_valid);
| ^~~~~~~~~~~~~~~~~~~~
jwt_mod.c:521:9: error: implicit declaration of function 'jwt_valid_free'; did you mean 'jwt_builder_free'? [-Wimplicit-function-declaration]
521 | jwt_valid_free(jwt_valid);
| ^~~~~~~~~~~~~~
| jwt_builder_free
make[2]: *** [../../Makefile.rules:100: jwt_mod.o] Error 1
make[1]: *** [Makefile:509: modules] Error 1
make[1]: Leaving directory '/usr/src/kamailio/pkg/kamailio/alpine/src/kamailio-78541805e73f1ca2a220e84734090ebd606bc5e4/src'
make: *** [Makefile:34: all] Error 2
>>> ERROR: kamailio: build failed
>>> kamailio: Uninstalling dependencies...
(1/1) Purging .makedepends-kamailio (20250527.180[501](https://github.com/sergey-safarov/kamailio/actions/runs/1…)
OK: 1028 MiB in 240 packages
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4264
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4264(a)github.com>
@sergey-safarov
I look a bit on this commit and some comments i can give are:
1) The config files of these modules are already installed by default when they are included to be built. No need for extra step.
2) These *-cfg components are no longer available after the refactoring to use build groups instead. Can you maybe confirm that? I expect that it silently does nothing instead of complaining...
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/9a1b9d08a112745663f37f0dfcbe86a…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/9a1b9d08a112745663f37f0dfcbe86a741486da3/158142732(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, ...)
- [ ] 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This PR introduces a new modparam `timer_interval` to denote the frequency where files are checked for rotation.
Also some improvements regarding memory managments and defaults options.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4263
-- Commit Summary --
* file_out: Consistent check
* file_out: Memory allocation and copy when used.
* file_out: Add debug function
* file_out: Add file properties init function
* file_out: Rotate files based on timer
* file_out: Add require_rotation for better file handling
* file_out: Fix missing evaluated PVs
* file_out/docs: Add timer_interval doc
-- File Changes --
M src/modules/file_out/doc/file_out_admin.xml (23)
M src/modules/file_out/file_out.c (193)
M src/modules/file_out/types.c (79)
M src/modules/file_out/types.h (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4263.patchhttps://github.com/kamailio/kamailio/pull/4263.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4263
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4263(a)github.com>