Module: kamailio
Branch: master
Commit: 8b60b56015ced6da3666c6613e1189b9a1f63d8f
URL: https://github.com/kamailio/kamailio/commit/8b60b56015ced6da3666c6613e1189b…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2025-03-05T13:16:09+01:00
modules: readme files regenerated - auth ... [skip ci]
---
Modified: src/modules/auth/README
---
Diff: https://github.com/kamailio/kamailio/commit/8b60b56015ced6da3666c6613e1189b…
Patch: https://github.com/kamailio/kamailio/commit/8b60b56015ced6da3666c6613e1189b…
---
diff --git a/src/modules/auth/README b/src/modules/auth/README
index 193f91e0ef5..fcd73cc02a0 100644
--- a/src/modules/auth/README
+++ b/src/modules/auth/README
@@ -76,7 +76,7 @@ Daniel-Constantin Mierla
1.13. force_stateless_reply example
1.14. realm_prefix parameter example
1.15. force_stateless_reply example
- 1.16. use SHA-256 example
+ 1.16. algorithm example
1.17. add Authentication-Info header example
1.18. consume_credentials example
1.19. consume_credentials example
@@ -645,17 +645,18 @@ modparam("auth", "use_domain", 1)
3.18. algorithm (string)
Configure hash algorithm used for digest authentication. Possible
- values are "MD5" or "SHA-256". If left empty MD5 is used. If specified,
- the specified algorithm is used and is also put in the 'algorithm'
- field of the challenge header.
-
- Warning: SHA-256 hash values take twice the space of MD5 hash values.
- So a buffer overflow might occur if this option is used in combination
- with another auth_* module that does not allocate at least 65 bytes to
- store hash values. SHA-256 can safely be used with the module auth_db
- as it allocates 256 bytes to store HA1 values.
-
- Example 1.16. use SHA-256 example
+ values are "MD5", "SHA-256" or "SHA-512". If left empty MD5 is used. If
+ specified, the specified algorithm is used and is also put in the
+ 'algorithm' field of the challenge header.
+
+ Warning: SHA-256/512 hash values take twice or more the space of MD5
+ hash values. So a buffer overflow might occur if this option is used in
+ combination with another auth_* module that does not allocate at least
+ enough (65 or 129) bytes to store hash values. SHA-256/512 can safely
+ be used with the module auth_db as it allocates 256 bytes to store HA1
+ values.
+
+ Example 1.16. algorithm example
...
modparam("auth", "algorithm", "SHA-256")
...
Module: kamailio
Branch: master
Commit: 05c796ab406d5771d775769b380219c6bdcb67c1
URL: https://github.com/kamailio/kamailio/commit/05c796ab406d5771d775769b380219c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-03-05T13:00:15+01:00
auth: docs updated for algorithm param
---
Modified: src/modules/auth/doc/auth_params.xml
---
Diff: https://github.com/kamailio/kamailio/commit/05c796ab406d5771d775769b380219c…
Patch: https://github.com/kamailio/kamailio/commit/05c796ab406d5771d775769b380219c…
---
diff --git a/src/modules/auth/doc/auth_params.xml b/src/modules/auth/doc/auth_params.xml
index 058c1d2706a..5e3f730bc39 100644
--- a/src/modules/auth/doc/auth_params.xml
+++ b/src/modules/auth/doc/auth_params.xml
@@ -705,20 +705,19 @@ modparam("auth", "use_domain", 1)
<title><varname>algorithm</varname> (string)</title>
<para>
Configure hash algorithm used for digest authentication.
- Possible values are "MD5" or "SHA-256". If left empty MD5 is used.
- If specified, the specified algorithm is used and is also put in
+ Possible values are "MD5", "SHA-256" or "SHA-512". If left empty MD5 is
+ used. If specified, the specified algorithm is used and is also put in
the 'algorithm' field of the challenge header.
</para>
<para>
- Warning: SHA-256 hash values take twice the space of MD5 hash values.
- So a buffer overflow might occur if this option is used in combination
- with another auth_* module that does not allocate at least 65 bytes to
- store hash values.
- SHA-256 can safely be used with the module auth_db as it allocates 256 bytes
- to store HA1 values.
+ Warning: SHA-256/512 hash values take twice or more the space of MD5 hash
+ values. So a buffer overflow might occur if this option is used in combination
+ with another auth_* module that does not allocate at least enough (65 or 129)
+ bytes to store hash values. SHA-256/512 can safely be used with the module
+ auth_db as it allocates 256 bytes to store HA1 values.
</para>
<example>
- <title>use SHA-256 example</title>
+ <title>algorithm example</title>
<programlisting>
...
modparam("auth", "algorithm", "SHA-256")
Bumps [wolletd/clang-format-checker](https://github.com/wolletd/clang-format-check… from 1.11 to 1.12.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/WolleTD/clang-format-checker/commit/ab6a81f3b… Merge pull request <a href="https://redirect.github.com/wolletd/clang-format-checker/issues/… from WolleTD/update-clang</li>
<li><a href="https://github.com/WolleTD/clang-format-checker/commit/4c205c944… Add clang-format 18 and 19</li>
<li><a href="https://github.com/WolleTD/clang-format-checker/commit/ea3c82c3a… Merge branch 'update-action'</li>
<li><a href="https://github.com/WolleTD/clang-format-checker/commit/e734d6075… Update actions to NodeJS 20</li>
<li>See full diff in <a href="https://github.com/wolletd/clang-format-checker/compare/v1.11...… view</a></li>
</ul>
</details>
<br />
[
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4162
-- Commit Summary --
* github: [skip ci]: bump wolletd/clang-format-checker from 1.11 to 1.12
-- File Changes --
M .github/workflows/pull_request.yml (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4162.patchhttps://github.com/kamailio/kamailio/pull/4162.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4162
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4162(a)github.com>
voztovoice created an issue (kamailio/kamailio#4160)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
Note that a feature request may be closed automatically after about 2 months
if there is no interest from developers or community users to implement it, being
considered expired. In such case can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the item is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in the proposed feature request.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Expected behavior
#### Actual observed behavior
#### Debugging Data
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4160
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4160(a)github.com>
voztovoice created an issue (kamailio/kamailio#4161)
As Asterisk PBX since version 20.12 supports **SHA-256** for digest authentication, it would be useful to be able to configure the authentication algorithm according to the device with which kamailio communicates.
It could be by indicating the two algorithms at the same time in this parameter:
**modparam("auth", "algorithm", "MD5,SHA-256")**
or have a function that allows activate one or the other depending on the device with which Kamailio communicates.
This because all the softphones I have tested so far do not support SHA-256
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4161
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4161(a)github.com>
QuincyGao created an issue (kamailio/kamailio#4159)
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
kamdbctl create db failed with mysql5.7, not find `ims_icscf-create.sql` file
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
./kamdbctl create kamailio_5_8_5
INFO: creating database kamailio_5_8_5 ...
INFO: granting privileges to database kamailio_5_8_5 ...
INFO: creating standard tables into kamailio_5_8_5 ...
INFO: Core Kamailio tables successfully created.
Create the presence related tables? (y/n): y
INFO: creating presence tables into kamailio_5_8_5 ...
INFO: Presence tables successfully created.
Create the tables for imc cpl siptrace domainpolicy carrierroute
drouting userblocklist htable purple uac pipelimit mtree sca mohqueue
rtpproxy rtpengine secfilter ims_icscf? (y/n): y
INFO: creating extra tables into kamailio_5_8_5 ...
/usr/local/lib64/kamailio//kamctl/kamdbctl.mysql: line 365: /usr/local/share/kamailio//mysql/ims_icscf-create.sql: No such file or directory
ERROR: Creating extra tables failed at ims_icscf!
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio -V
version: kamailio 5.8.5 (x86_64/linux)
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, 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:
compiled on 13:51:42 Feb 27 2025 with gcc 4.8.5
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4159
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4159(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
We are plotting the call success rate on each of our proxies.
Using the Kamailio snmpstats module, we try to obtain three counters in order to plot them on a graph:
- Total Calls
- Active Calls
- Error Calls
Most of the time, everything works well and we obtain sensible values:
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 309 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 95 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 214 -> Error calls
However, **when our proxies are facing intense peaks of failed calls in a short timespan**, sometimes, the **"Error Calls"** counter returns a value **higher than "Total Calls"**. As a result, **"Active Calls"** suddenly reaches a value close to the **maximum of a _Gauge32_** (because ${TotalCalls} - {ErrorCalls} < 0$).
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 153 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 4294967226 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 223 -> Error calls
As a result, our graphs make no more sense.
### Troubleshooting
There seems to be a bug causing Total calls to be lower than Error calls when a high number of failed calls are received in a short time window.
Moreover, there is an integer overflow resulting to the negative result of the substraction being converted to a _Gauge32_. Maybe setting it to 0 in case of a negative result would be safer ?
#### Reproduction
Using the following configuration for the snmpstats module of your Kamailio proxy:
```
# -------- snmpstats params -------
modparam("snmpstats", "snmpgetPath", "/usr/bin/")
modparam("snmpstats", "snmpCommunity", "mycommunity")
modparam("snmpstats", "sipEntityType", "proxyServer")
```
On intense peaks of failed calls, get the call success metrics using `snmpwalk` :
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 153 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 4294967226 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 223-> Error calls
### Additional Information
**Kamailio Version**:
`kamailio -v`
> version: kamailio 5.6.4 (x86_64/linux) a004cf
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_ MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_S R_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, U SE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SI ZE 65535, DEFAULT PKG_SIZE 64MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: a004cf
compiled on 16:10:41 May 22 2023 with gcc 4.4.7
* **Operating System**:
`uname -r`
> 2.6.32-279.el6.x86_64
`lsb_release -a`
> LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Release: 6.3
Codename: Santiago
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4006
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4006(a)github.com>
Module: kamailio
Branch: master
Commit: 6cdbaa1815bdcadc467f36109c6e3a7d00c344f5
URL: https://github.com/kamailio/kamailio/commit/6cdbaa1815bdcadc467f36109c6e3a7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-02-24T12:30:26+01:00
ims_dialog: right timer function prototype for print_all_dlgs()
---
Modified: src/modules/ims_dialog/dlg_handlers.c
Modified: src/modules/ims_dialog/dlg_handlers.h
---
Diff: https://github.com/kamailio/kamailio/commit/6cdbaa1815bdcadc467f36109c6e3a7…
Patch: https://github.com/kamailio/kamailio/commit/6cdbaa1815bdcadc467f36109c6e3a7…
---
diff --git a/src/modules/ims_dialog/dlg_handlers.c b/src/modules/ims_dialog/dlg_handlers.c
index 3487d7f4c2a..4acc5c3ad45 100644
--- a/src/modules/ims_dialog/dlg_handlers.c
+++ b/src/modules/ims_dialog/dlg_handlers.c
@@ -2048,7 +2048,7 @@ void internal_print_all_dlg(struct dlg_cell *dlg)
* \return void
*/
-void print_all_dlgs()
+void print_all_dlgs(unsigned int ticks, void *param)
{
//print all dialog information - this is just for testing and is set to happen every 10 seconds
diff --git a/src/modules/ims_dialog/dlg_handlers.h b/src/modules/ims_dialog/dlg_handlers.h
index fd8ef143352..5aafb054b18 100644
--- a/src/modules/ims_dialog/dlg_handlers.h
+++ b/src/modules/ims_dialog/dlg_handlers.h
@@ -196,7 +196,7 @@ void dlg_tmcb_dummy(struct cell *t, int type, struct tmcb_params *param);
* \return void
*/
-void print_all_dlgs();
+void print_all_dlgs(unsigned int ticks, void *param);
/*!
* \brief Helper function that prints all the properties of a dialog including all the dlg_out's
### Description
There're `1xx_replies` metric in `sl` module. But the metric doesn't work.
### Troubleshooting
There're no handle in `void update_sl_stats(int code)`.
https://github.com/kamailio/kamailio/blob/f37940b9a113ab79611f851334af7f8fb…
### Proposal
Remove `1xx_replies` from `sl` module. Or add the handling.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4144
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4144(a)github.com>
Fixes for SEGV in dialog module.
<!-- 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)
- [ ] 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
Hi !
The problem - periodically, 2-3 times in а month, kamailio dumps core with SEGV.
Different OS versions (Ubuntu 18,20,22), different kamailio versions from 5.7.1 up to 5.8.4,
high call load, python kemi, actively used dialog module.
Analyzing core files shows more or less the same picture - SEGV happends in dialog mododule
around the dialog vars, can be in rpc call (dlg.list), in destroy dlg, in accessing dlg variable.
Backtrace can look like:
```
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 get_dlg_variable_unsafe (dlg=dlg@entry=0x7fa2818849b8, key=key@entry=0x7ffe67990d68) at dlg_var.c:236
236 dlg_var.c: No such file or directory.
(gdb) bt full
#0 get_dlg_variable_unsafe (dlg=dlg@entry=0x7fa2818849b8, key=key@entry=0x7ffe67990d68) at dlg_var.c:236
var = 0x8
var_list = <optimized out>
#1 0x00007fa2a2ce0397 in get_dlg_varref (dlg=dlg@entry=0x7fa2818849b8, key=key@entry=0x7ffe67990d68) at dlg_var.c:297
var = 0x0
__func__ = "get_dlg_varref"
#2 0x00007fa2a2ccd429 in ki_dlg_var_get_mode (msg=<optimized out>, name=0x7ffe67990d68, rmode=0) at dialog.c:2462
dlg = 0x7fa2818849b8
pval = <optimized out>
#3 0x000055e2d5b87cbb in sr_kemi_exec_func (ket=ket@entry=0x7fa2a2d0c0c0 <sr_kemi_dialog_exports+1728>, msg=msg@entry=0x7fa2a34577c0, pno=pno@entry=1, vps=vps@entry=0x7ffe67990d60) at core/kemiexec.c:82
ret = <optimized out>
__func__ = "sr_kemi_exec_func"
#4 0x00007fa2a2930376 in sr_apy_kemi_exec_func_ex (ket=ket@entry=0x7fa2a2d0c0c0 <sr_kemi_dialog_exports+1728>, self=self@entry=0x7fa280ce2b80, args=args@entry=0x7fa2804ba3a0, idx=idx@entry=485) at apy_kemi.c:327
fname = <optimized out>
i = <optimized out>
ret = <optimized out>
vps = {{vtype = 2, v = {n = -2142122656, l = 140335914274144, s = {s = 0x7fa28051cd60 "rtpe_setid", len = 10}, dict = 0x7fa28051cd60}}, {vtype = 0, v = {n = 0, l = 0, s = {s = 0x0, len = 0}, dict = 0x0}}, {vtype = 0, v = {
n = 0, l = 0, s = {s = 0x0, len = 0}, dict = 0x0}}, {vtype = 0, v = {n = 0, l = 0, s = {s = 0x0, len = 0}, dict = 0x0}}, {vtype = 0, v = {n = 0, l = 0, s = {s = 0x0, len = 0}, dict = 0x0}}, {vtype = 0, v = {n = 0, l = 0,
s = {s = 0x0, len = 0}, dict = 0x0}}}
env_P = <optimized out>
lmsg = 0x7fa2a34577c0
xret = <optimized out>
slen = 10
alen = 1
pobj = <optimized out>
__func__ = "sr_apy_kemi_exec_func_ex"
#5 0x00007fa2a2931f45 in sr_apy_kemi_exec_func (self=0x7fa280ce2b80, args=0x7fa2804ba3a0, idx=485) at apy_kemi.c:356
ket = 0x7fa2a2d0c0c0 <sr_kemi_dialog_exports+1728>
ret = 0x0
pstate = 0x0
pframe = 0x0
tvb = {tv_sec = 0, tv_usec = 0}
tve = {tv_sec = 0, tv_usec = 0}
tz = {tz_minuteswest = 2, tz_dsttime = 0}
tdiff = <optimized out>
__func__ = "sr_apy_kemi_exec_func"
#6 0x00007fa2a266f697 in ?? () from /lib/x86_64-linux-gnu/libpython3.8.so.1.0
```
Inspecting dlg vars, the chain look like this:
```
(gdb) frame 0
#0 get_dlg_variable_unsafe (dlg=dlg@entry=0x7fa2818849b8, key=key@entry=0x7ffe67990d68) at dlg_var.c:236
236 in dlg_var.c
(gdb) p *dlg.vars
$1 = {key = {s = 0x7fa2833ea040 "mos", len = 3}, value = {s = 0x7fa2833ea0b0 "4.3", len = 3}, vflags = 1, next = 0x7fa2825fa3d0}
(gdb) p *$.next
$2 = {key = {s = 0x7fa200332e34 <error: Cannot access memory at address 0x7fa200332e34>, len = -1061109568}, value = {s = 0xabcdefed <error: Cannot access memory at address 0xabcdefed>, len = 49}, vflags = 1, next = 0x8}
(gdb)
```
Additionaly, inspecting logs i found that this is happends in SIP race conditions, f.e. when caller and calle sends BYE at the same time and
kamailio processing two different transactions of same dialog in two different workers, so present some competition from identical scenarios.
Long time i can't reproduce this in lab, until insert an artificial delay into the scenario which process BYE request to increase competition.
This code quickly causes SEGV in race conditions with BYE:
```
#kemi get/set dlg var
while time.time()-start < 0.5:
for i in ('bbb','ccc'):
dlgvar=KSR.dialog.var_get(i)
KSR.dialog.var_sets(i,str(random.randint(1,500000)))
```
SEGV not fire if i change dialog var_get/set to kamscript variant:
```
while time.time()-start < 0.5:
for i in ('bbb','ccc'):
dlgvar=KSR.pv.get(f"$dlg_var({i})")
KSR.pv.sets(f"$dlg_var({i})", str(random.randint(1,500000)))
```
By analyzing source i found some places which are not properly covered by locks, and some dangerous places
where direct pointer to dialog var structure used, which can change in concurrent process,
so in first case i insert the locks, in second - it is better to use the clone of variable in private PV buffer.
Also found some mistakes with dialog flags, which can potentionaly affect DMQ and DB dialog behavior.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4151
-- Commit Summary --
* dialog: covering by locks accessing/changing variables in kemi functions
-- File Changes --
M src/modules/dialog/dialog.c (36)
M src/modules/dialog/dlg_hash.h (2)
M src/modules/dialog/dlg_var.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4151.patchhttps://github.com/kamailio/kamailio/pull/4151.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4151
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4151(a)github.com>
Hi There,
We found a situation where topos seems to break, let me explain... Assuming the following scenario:
```
Caller ---- Callee
A: ------INVITE-----> Record-Route:A.A.A.A, Record-Route:B.B.B.B
B: <-----200 OK------
C: <-----INVITE------ Route: A.A.A.A, B.B.B.B
D: ------200 OK-----> Record-Route:B.B.B.B, Record-Route:A.A.A.A (reversed order)
E: <======INVITE===== Route: B.B.B.B, A.A.A.A (wrong)
```
A and B establish the connection from caller to callee, and topos works fine.
C (re-INVITE from callee) sends the Route header according to the Record-Routes from the original INVITE (A)
D is the 200 OK sent from the caller to the first re-INVITE (C) coming from the callee, with the Record-Route headers reversed, because is the order in which the callee received them; and according to the RFC it's working as intended:
```
When a UAS responds to a request with a response that establishes a
dialog (such as a 2xx to INVITE), the UAS MUST copy all Record-Route
header field values from the request into the response (including the
URIs, URI parameters, and any Record-Route header field parameters,
whether they are known or unknown to the UAS) and MUST maintain the
order of those values.
[...]
[When a UAC receives a response...]
The route set MUST be set to the list of URIs in the Record-Route
header field from the response, taken in reverse order and preserving
all URI parameters.
```
E takes the Route order from the last 200 OK ignoring they are in reversed order and assuming the top one is the first one, when it should be the other way around, sending to an IP address not reachable from the callee. And I think here is the issue, topos should not update the path on the Record-Routes from a 200 OK but if it does, it should take the reverse order
When disabling topos, everything works fine, or with topos enabled, by setting rr_update=0 works for us, but what if there is a real path update, rr_update=0 wouldn't work for us anymore. The Kamailio version is 5.8.0-rc0
Let me know if you need more information.
Thanks a lot,
Javi
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3778
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3778(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 -->
- [ ] 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 -->
Add new api function to dmq to get local socket. Use that in dmq_usrloc.
Sync dmq_usrloc UL_CONTACT_EXPIRE. Very useful for lost TCP connections, so contacts will be expired on all dmq nodes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4134
-- Commit Summary --
* dmq: add new api function
* dmq_usrloc: new value for replicate_socket_info
* dmq_usrloc: add new modparam to sync UL_CONTACT_EXPIRE actions
-- File Changes --
M src/modules/dmq/bind_dmq.c (1)
M src/modules/dmq/bind_dmq.h (2)
M src/modules/dmq/dmq_funcs.c (5)
M src/modules/dmq/dmq_funcs.h (1)
M src/modules/dmq_usrloc/dmq_usrloc.c (3)
M src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml (26)
M src/modules/dmq_usrloc/usrloc_sync.c (22)
M src/modules/dmq_usrloc/usrloc_sync.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4134.patchhttps://github.com/kamailio/kamailio/pull/4134.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4134
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4134(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 -->
- [ ] 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 -->
Add new parameter for dmq module "remove_inactive" that controls removing nodes behavior. Default value is 1, so the behavior will not changed by default.
This is useful especially with notification peers that are defined as dns record together with enabled multi_notify option.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4146
-- Commit Summary --
* dmq: added remove_inactive parameter
-- File Changes --
M src/modules/dmq/dmq.c (2)
M src/modules/dmq/dmq.h (1)
M src/modules/dmq/doc/dmq_admin.xml (20)
M src/modules/dmq/notification_peer.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4146.patchhttps://github.com/kamailio/kamailio/pull/4146.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4146
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4146(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 -->
- [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 -->
Few fixes to topos_htable module. To be backported in 6.0 branch.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4133
-- Commit Summary --
* topos_htable: fix xtag and add more snprintf checks
-- File Changes --
M src/modules/topos_htable/topos_htable_storage.c (25)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4133.patchhttps://github.com/kamailio/kamailio/pull/4133.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4133
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4133(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 -->
- [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 -->
Dispatcher timer regularly pings the nodes. Should skip resolving and pinging the no-dns-A flag ones since those node do not have an A record by definition.
Otherwise that no-dns-A flag(state) is overwritten by the pinging process. This leads to node removal from group, after RPC commands e.g. "kamcmd dispatcher.add/remove".
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4150
-- Commit Summary --
* dispatcher: skip ping for DS_NODNSARES_DST
-- File Changes --
M src/modules/dispatcher/dispatch.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4150.patchhttps://github.com/kamailio/kamailio/pull/4150.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4150
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4150(a)github.com>