Module: kamailio
Branch: master
Commit: c57dfd9869b32b1901fd4b76b7f5a50239f9bce0
URL: https://github.com/kamailio/kamailio/commit/c57dfd9869b32b1901fd4b76b7f5a50…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2025-07-14T15:46:10+02:00
modules: readme files regenerated - permissions ... [skip ci]
---
Modified: src/modules/permissions/README
---
Diff: https://github.com/kamailio/kamailio/commit/c57dfd9869b32b1901fd4b76b7f5a50…
Patch: https://github.com/kamailio/kamailio/commit/c57dfd9869b32b1901fd4b76b7f5a50…
---
diff --git a/src/modules/permissions/README b/src/modules/permissions/README
index 39d6435b153..144e36f9471 100644
--- a/src/modules/permissions/README
+++ b/src/modules/permissions/README
@@ -348,6 +348,21 @@ Chapter 1. Admin Guide
module parameter) is added as value to peer_tag AVP if peer_tag_avp
module parameter has been defined.
+Note
+
+ Starting with Kamailio version 6.1.x, the allow_address() function and
+ its related functions use the Longest Prefix Match (LPM) method to find
+ matching entries.
+
+ This means the _group variants will now return the most specific
+ (longest) subnet match, instead of the first match (which was
+ previously the entry with the lowest group ID). This LPM behavior is
+ now consistent across the following functions:
+ * allow_address()
+ * allow_source_address()
+ * allow_source_address_group()
+ * allow_address_group()
+
1.5. Trusted Requests
The module can be used to determine if an incoming request can be
@@ -1013,6 +1028,10 @@ if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705)
any port. The “group_id” argument can be an integer string or a pseudo
variable.
+Note
+
+ See Address permissions for more details.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Example 1.35. allow_address() usage
@@ -1035,6 +1054,10 @@ if (!allow_address("2", "$avp(dst_adr)", "$avp(dst_port)") {
Equal to “allow_address(group_id, "$si", "$sp")”. If 'group_id' is
missing, the function is equal to allow_address("1", "$si", "$sp").
+Note
+
+ See Address permissions for more details.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Example 1.36. allow_source_address(group_id) usage
@@ -1052,6 +1075,11 @@ if (!allow_source_address("1")) {
table in any group. If yes, returns that group. If not returns -1. Port
value 0 in cached address and group table matches any port.
+Note
+
+ See Address permissions for more details on how searching is
+ implemented.
+
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Example 1.37. allow_source_address_group() usage
@@ -1070,6 +1098,11 @@ if ($var(group) != -1) {
in cached address and group table matches any port. The parameters can
be pseudo-variables.
+Note
+
+ See Address permissions for more details on how searching is
+ implemented.
+
This function can be used from ANY_ROUTE.
Example 1.38. allow_source_address_group() usage
Module: kamailio
Branch: master
Commit: 9e0402e9b1d9d789211bfb3c13fc11ab6d5fa320
URL: https://github.com/kamailio/kamailio/commit/9e0402e9b1d9d789211bfb3c13fc11a…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2025-07-14T15:42:47+02:00
permissions: doc: Add note related to LPM search
- allow_address() and 3 more related function now perform LPM search
- allow_source_address()
- allow_source_address_group()
- allow_address_group
---
Modified: src/modules/permissions/doc/permissions_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9e0402e9b1d9d789211bfb3c13fc11a…
Patch: https://github.com/kamailio/kamailio/commit/9e0402e9b1d9d789211bfb3c13fc11a…
---
diff --git a/src/modules/permissions/doc/permissions_admin.xml b/src/modules/permissions/doc/permissions_admin.xml
index 494a7ecc0fb..f893a3e4eb7 100644
--- a/src/modules/permissions/doc/permissions_admin.xml
+++ b/src/modules/permissions/doc/permissions_admin.xml
@@ -221,6 +221,25 @@
(see tag_col module parameter) is added as value to
peer_tag AVP if peer_tag_avp module parameter has been defined.
</para>
+ <note>
+ <para>
+ Starting with Kamailio version 6.1.x, the <function>allow_address()</function>
+ function and its related functions use the Longest Prefix Match (LPM) method to
+ find matching entries.
+ </para>
+ <para>
+ This means the <function>_group</function> variants will now return the most specific
+ (longest) subnet match, instead of the first match (which was previously the entry with
+ the lowest group ID).
+ This LPM behavior is now consistent across the following functions:
+ </para>
+ <itemizedlist>
+ <listitem><para><function>allow_address()</function></para></listitem>
+ <listitem><para><function>allow_source_address()</function></para></listitem>
+ <listitem><para><function>allow_source_address_group()</function></para></listitem>
+ <listitem><para><function>allow_address_group()</function></para></listitem>
+ </itemizedlist>
+ </note>
</section>
<section id="sec-trusted-requests">
<title>Trusted Requests</title>
@@ -1259,6 +1278,9 @@ if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705)
matches any port. The <quote>group_id</quote> argument can be an integer
string or a pseudo variable.
</para>
+ <note>
+ See <link linkend="sec-address-permissions"> Address permissions </link> for more details.
+ </note>
<para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
</para>
@@ -1289,6 +1311,9 @@ if (!allow_address("2", "$avp(dst_adr)", "$avp(dst_port)") {
Equal to <quote>allow_address(group_id, "$si", "$sp")</quote>. If 'group_id' is
missing, the function is equal to allow_address("1", "$si", "$sp").
</para>
+ <note>
+ See <link linkend="sec-address-permissions"> Address permissions </link> for more details.
+ </note>
<para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
</para>
@@ -1315,6 +1340,10 @@ if (!allow_source_address("1")) {
If not returns -1. Port value 0 in cached address and
group table matches any port.
</para>
+ <note>
+ See <link linkend="sec-address-permissions"> Address permissions </link>
+ for more details on how searching is implemented.
+ </note>
<para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
</para>
@@ -1341,6 +1370,10 @@ if ($var(group) != -1) {
If not returns -1. Port value 0 in cached address and
group table matches any port. The parameters can be pseudo-variables.
</para>
+ <note>
+ See <link linkend="sec-address-permissions"> Address permissions </link>
+ for more details on how searching is implemented.
+ </note>
<para>
This function can be used from ANY_ROUTE.
</para>
kurtyks created an issue (kamailio/kamailio#4316)
<!--
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)
```
Rn. UAC module allows only global setting of Contact header, while sending REGISTER to UAS. It is done by setting param reg_contact_addr (string).
This is edge case, but sometimes for diffrent itsp’s i need to pass diffrent contact value, while for example one is on public internet, other is behind vpn.
It d be nice just to extend uacreg table + contact_addr, contact_port, contact_user or just by adding contact field with URI to be sent in register.
### 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/4316
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4316(a)github.com>
Module: kamailio
Branch: master
Commit: b83794109113cbbd335625796f55d2b5aaa3968f
URL: https://github.com/kamailio/kamailio/commit/b83794109113cbbd335625796f55d2b…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2025-07-14T13:01:10+02:00
modules: readme files regenerated - dialog ... [skip ci]
---
Modified: src/modules/dialog/README
---
Diff: https://github.com/kamailio/kamailio/commit/b83794109113cbbd335625796f55d2b…
Patch: https://github.com/kamailio/kamailio/commit/b83794109113cbbd335625796f55d2b…
---
diff --git a/src/modules/dialog/README b/src/modules/dialog/README
index be626d40c7c..dab489750b1 100644
--- a/src/modules/dialog/README
+++ b/src/modules/dialog/README
@@ -669,7 +669,7 @@ modparam("dialog", "rr_param", "xyz")
6.4. dlg_flag (integer)
- Note: This flag has beed deprecated and not used anyymore. it is not
+ Note: This flag has beed deprecated and not used anymore. It is not
needed to set this parameter and its corresponding flag for initial
request in case the “dlg_manage()” function is used. In other words,
use “dlg_manage()”.
<!-- 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4322
-- Commit Summary --
* htable: Fix typo
* core: Fix typos
* pv: Fix typo
-- File Changes --
M src/core/parser/parse_fline.c (2)
M src/core/tcp_conn.h (2)
M src/core/timer.h (2)
M src/core/timer_ticks.h (2)
M src/modules/pv/pv.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4322.patchhttps://github.com/kamailio/kamailio/pull/4322.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4322
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4322(a)github.com>