Module: kamailio
Branch: master
Commit: 7470ab6d16200f011dc33aad5ad4e89483af12e6
URL: https://github.com/kamailio/kamailio/commit/7470ab6d16200f011dc33aad5ad4e89…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-10-31T17:16:14+01:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/7470ab6d16200f011dc33aad5ad4e89…
Patch: https://github.com/kamailio/kamailio/commit/7470ab6d16200f011dc33aad5ad4e89…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 1949131062..a460ffff60 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -1296,9 +1296,10 @@ if(ds_list_exists("10")) {
specific group id. The parameter can be an integer or a variable
holding an integer value.
* mode - (optional) - a bitmask to specify how the matching should be
- done. If is 0, all ip, port and proto are matched. If bit one is
- set, then port is ignored. If bit two is set, then protocol is
- ignored. The parameter can be an integer or a variable holding an
+ done. If is 0, all ip, port and proto are matched and active status
+ is ignored. If bit one is set, then port is ignored. If bit two is
+ set, then protocol is ignored. If bit three is set, then state must
+ be active. The parameter can be an integer or a variable holding an
integer value. It must be provided if the uri parameter is
provided.
* uri (optional) - if is empty or missing, the matching is done
<!-- 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 -->
adds Bit 3 to mode parameter in ds_list_exists to allow the check of active/inactive entries in a list
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2117
-- Commit Summary --
* dispatcher: add state to mode in ds_list_exists
-- File Changes --
M src/modules/dispatcher/dispatch.c (4)
M src/modules/dispatcher/dispatch.h (1)
M src/modules/dispatcher/doc/dispatcher_admin.xml (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2117.patchhttps://github.com/kamailio/kamailio/pull/2117.diff
--
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/pull/2117
Module: kamailio
Branch: master
Commit: 2945ba448c6365728b49c10ba98824be357f85b3
URL: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824b…
Author: lazedo <luis.azedo(a)factorlusitano.com>
Committer: lazedo <luis.azedo(a)factorlusitano.com>
Date: 2019-10-31T16:12:31Z
dispatcher: add state to mode in ds_list_exists
adds Bit 3 to allow the check of active/inactive entries in ds_list
---
Modified: src/modules/dispatcher/dispatch.c
Modified: src/modules/dispatcher/dispatch.h
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824b…
Patch: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824b…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 18b713ce02..75b3b56f3a 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2998,7 +2998,9 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr *pipaddr,
&& ((mode & DS_MATCH_NOPORT) || node->dlist[j].port == 0
|| tport == node->dlist[j].port)
&& ((mode & DS_MATCH_NOPROTO)
- || tproto == node->dlist[j].proto)) {
+ || tproto == node->dlist[j].proto)
+ && (((mode & DS_MATCH_ACTIVE) && !ds_skip_dst(node->dlist[j].flags))
+ || !(mode & DS_MATCH_ACTIVE))) {
if(export_set_pv && ds_setid_pvname.s != 0) {
memset(&val, 0, sizeof(pv_value_t));
val.flags = PV_VAL_INT | PV_TYPE_INT;
diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h
index 3a6a5aedc6..e4a54944aa 100644
--- a/src/modules/dispatcher/dispatch.h
+++ b/src/modules/dispatcher/dispatch.h
@@ -57,6 +57,7 @@
#define DS_MATCH_ALL 0
#define DS_MATCH_NOPORT 1
#define DS_MATCH_NOPROTO 2
+#define DS_MATCH_ACTIVE 4
#define DS_SETOP_DSTURI 0
#define DS_SETOP_RURI 1
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 11881bbed5..94e7062705 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1569,8 +1569,10 @@ if(ds_list_exists("10")) {
<listitem>
<para><emphasis>mode</emphasis> - (optional) - a bitmask to specify
how the matching should be done. If is 0, all ip, port and
- proto are matched. If bit one is set, then port is ignored.
- If bit two is set, then protocol is ignored. The parameter
+ proto are matched and active status is ignored.
+ If bit one is set, then port is ignored.
+ If bit two is set, then protocol is ignored.
+ If bit three is set, then state must be active. The parameter
can be an integer or a variable holding an integer value.
It must be provided if the uri parameter is provided.
</para>
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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.
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
Currently ds_is_from_list() matches all GWs in the dispatcher list, not considering if the GW is disabled or not. It might have situation where a GW is permanently disabled but can't be removed (because of CDR references for instance). In this case it is not desired to match a disabled GW in the test.
The function should accept a new parameter which will tell if it should or not match disabled GWs. For backward compatibility, it should not be a mandatory parameter and its default value should be to match disabled GW (as it is today).
### Expected behavior
ds_is_from_list() should return false in case it matches a disabled GW and the new parameter tells not to match disabled GWs.
--
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/1908
<!-- 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Fixed that if `mnl_socket_bind` return error, the socket is leaking.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2113
-- Commit Summary --
* ims_ipsec_pcscf: fix non-close mnl_socket when a bind error
-- File Changes --
M src/modules/ims_ipsec_pcscf/ipsec.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2113.patchhttps://github.com/kamailio/kamailio/pull/2113.diff
--
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/pull/2113