[sr-dev] [kamailio/kamailio] tcpops: fix memory leak in $tcp(conid) (PR #3924)

2024-07-18 Thread Dennis via sr-dev

!-- 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 youre unsure about any of these, dont 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 # (replace  with an open issue number)

 Description
!-- Describe your changes in detail --

Reference counter to tcp session not decremented after use $tcp(conid), so shm 
for session never free.
Can be releated to: 
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg21294.html

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3924

-- Commit Summary --

  * tcpops: fix memory leak in $tcp(conid)

-- File Changes --

M src/modules/tcpops/tcpops_mod.c (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3924.patch
https://github.com/kamailio/kamailio/pull/3924.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3924
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] Siptrace: setting send_sock_name/send_sock_address is ineffective for tcp based transports (PR #3837)

2024-05-02 Thread Dennis via sr-dev
For tcp based transports it is need to set SND_F_FORCE_SOCKET flag before 
msg_send_buffer call, or duplicate will send from wrong addr/port.

!-- 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 youre unsure about any of these, dont 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 # (replace  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/3837

-- Commit Summary --

  * siptrace: add SND_F_FORCE_SOCKET flag if send_sock_name/send_sock_address 
config parameters are used

-- File Changes --

M src/modules/siptrace/siptrace_send.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3837.patch
https://github.com/kamailio/kamailio/pull/3837.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3837
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] dispatcher: refine documentation (PR #3783)

2024-03-11 Thread Dennis via sr-dev
- more clear documentation for the new ds_is_from_list flags

!-- 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 youre unsure about any of these, dont 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 # (replace  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/3783

-- Commit Summary --

  * dispatcher: refine documentation

-- File Changes --

M src/modules/dispatcher/doc/dispatcher_admin.xml (9)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3783.patch
https://github.com/kamailio/kamailio/pull/3783.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3783
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-03-11 Thread Dennis via sr-dev
Hi, @miconda !

About the docs changes above, do i need to make a new PR, this one is closed ?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1988089752
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-26 Thread Dennis via sr-dev
Thansk for merging @miconda !

I wanted to offer a version of the documentation for flag 16 to make it more 
clear:

If bit five is set, then try to find the most closest target from all 
dispatcher targets with the mandatory ip and combination of local socket, 
protocol, port.
The weighted search result is combined from bit flags of matched components: ip 
- 1, port - 2, protocol - 4, local socket - 8, the target with the maximum 
value of flags combination will be selected.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1963943052
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-21 Thread Dennis via sr-dev
Hi !

Yes, i need to refine the docs, will try to do at this weekends.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1957261250
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-31 Thread Dennis via sr-dev
> Your last comment does not clarify if a destination record matching (ip, 
> socket) has to be selected over one that matches (ip, port, proto). Can you 
> present the order of selection based on matching the values for ip, port, 
> proto or socket?

The strictness are defined by the flags combination:

#define DS_MATCHED_ADDR 1
#define DS_MATCHED_PORT (1 << 1)
#define DS_MATCHED_PROTO (1 << 2)
#define DS_MATCHED_SOCK (1 << 3)

in each iteration global variable ds_strictness are "OR-ed" with corresponding 
flag by criteria of matching, the winner is that which have the greatest value, 
for example if we have:

##ip, port, protocol
70 sip:192.168.1.1:5060;transport=udp 0 1 route=route1
#ip and socket
90 sip:192.168.1.1 0 1 route=route2;sockname=udp_5060

in first case we have flags: DS_MATCHED_ADDR | DS_MATCHED_PORT | 
DS_MATCHED_PROTO (7)
in second: MATCHED_ADDR | DS_MATCHED_SOCK (9)

The winner will be second, in this case 90.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1919401498
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-26 Thread Dennis via sr-dev
Hi!
Sorry, I was sick last week...
> because of the flag for socket matching, record matching (ip, socket) is 
> selected. Is this the desired behavior. 
Yes, this is the desired behavior, because we can only have a target with an ip 
and socket like this (it seems to be a valid configuration):

70 sip:192.168.1.1 0 1 route=route 1;sockname=udp_5060

>Somehow, it should be clear in the documents how the destination record is 
>selected.
I understood, I will supplement the documentation more fully on this occasion.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1911841712
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> I meant for the case/flag DS_MATCH_FULLADDRSOCK: a destination record that 
> matches **only** the socket is selected against one that matches 
> address+port+proto.

Using DS_MATCH_TRY_FULL ADDR SOCK, at least an ip must also be matched, and in 
this mode we do not interrupt the serach cycle, trying to find a more complete 
match, so the ip+socket combination will be valid, but not only the socket 
match. If i am right understand the question.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-119042
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> If I understand the code correctly, a destination record that matches only 
> the socket is selected against one that matches address/port/proto? Is it 
> like that and if yes, is it the expected result?

Yes, it is a separate flag - DS_MATCH_SOCKET (8), it work like 
ds_is_from_list(-1,0), but socket is take in account also (if specified in the 
configuration).



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1888650488
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-10 Thread Dennis via sr-dev
I have changed the flag name and added docs to xml.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1884558285
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-10 Thread Dennis via sr-dev
@Den4t pushed 1 commit.

53ae14294f021ae615c0fae6ec9b48758d9a051e  dispatcher: added two new flags to 
mode parameter of ds_is_from_list function for more strictly matching

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3699/files/9ef53dd70fb412a8c0754b523253be9478951a06..53ae14294f021ae615c0fae6ec9b48758d9a051e
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Dennis via sr-dev
> I've not done any testing myself, but by my understanding the 
> DS_MATCH_STRICTEST flag is basically a flag to indicate it should not return 
> on the first match but scan through all. Then sort and return the one that is 
> matching one most criterias?

Right, but not exactly, there is no sorting as separate entity, during the 
traverse of tree the gobal variable filled with strictess flags (which are the 
bitmask of sip uri components - addr/proto/port and local socket) and more 
strictess node is saved in process global variable, if full set of possible 
flags is found, the cycle is stopped (we found full match and no more 
iterations needed), when traverse pocess finished (resursive method in original 
code) and we are not found full match, the global vars will contains more 
strictness node (if found at least address match), from this global vars then 
making out the final result of ds_is_from_list.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1879215548
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Dennis via sr-dev
> Maybe DS_MATCH_FULLADDRSOCK.

OK, i will change the flag name, need some time to think about adequate name, 
writing docs hope can help with this.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1879191053
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-04 Thread Dennis via sr-dev


!-- 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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 # (replace  with an open issue number)

 Description

This PR adds 2 new flags to the mode parameter of the ds_is_from_list function.

Some times the dispatcher configuration can look like this (route attribute is 
just for exampe, sockname is important here):

70 sip:192.168.1.1:5060;transport=udp 0 1 route=route1;sockname=udp_5060
71 sip:192.168.1.1:5060;transport=udp 0 1 route=route2;sockname=udp_5061
72 sip:192.168.1.1:5060;transport=udp 0 1 route=route3;sockname=udp_5062
73 sip:192.168.1.1:5060;transport=udp 0 1 route=route4;sockname=udp_5063

Here we have one host/port/protocol on the remote side and different ports that 
we are listening on,
In stock dispatcher version ds_is_from_list(-1,0) will always match first 
available - 70, but this is not right
for dst ports 5061-5063 (sockets in realality, because we can have different 
local ip on same port also).
The new mode flag DS_MATCH_SOCKET (8) allow match for dispatcher socket also.

Second flag is DS_MATCH_STRICTEST (16), it allow to match more strictness 
target in address/protocol/port/socket key,
for example:

70 sip:192.168.1.1;transport=udp 0 1 route=route1
71 sip:192.168.1.1:5061;transport=udp 0 1 route=route2
72 sip:192.168.1.1:5062;transport=udp 0 1 route=route3
73 sip:192.168.1.1;transport=udp 0 1 route=route4;socket=udp:192.168.10.10:5063

if packet come from from any port of sip:192.168.1.1;transport=udp except 
5061-5062 ds_is_from list will return 70,
if received port also is 5063 the result will be 73, packets from ports 
5061-5062 will be matched at 71-72 respectively.
In stock version of ds_is_from_list the result will always be 70.

Note, the DS_MATCH_STRICTEST method can be more compute intensive, because we 
can potentially traverse all the dispatcher tree.

The behavior of existing flags are not changed.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3699

-- Commit Summary --

  * dispatcher: added two new flags to mode parameter of ds_is_from_list 
function for more strictly matching

-- File Changes --

M src/modules/dispatcher/dispatch.c (112)
M src/modules/dispatcher/dispatch.h (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3699.patch
https://github.com/kamailio/kamailio/pull/3699.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Fixed saving dialogs on shutdown that are already loaded at startup in db_mode 3 (PR #3688)

2023-12-26 Thread Dennis via sr-dev
Done

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3688#issuecomment-1869732914
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Fixed saving dialogs on shutdown that are already loaded at startup in db_mode 3 (PR #3688)

2023-12-22 Thread Dennis via sr-dev
Some incorrect identation was found after initial commit, fixed in additional 
commits.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3688#issuecomment-1867912566
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Fixed saving dialogs on shutdown that are already loaded at startup in db_mode 3 (PR #3688)

2023-12-22 Thread Dennis via sr-dev
@Den4t pushed 1 commit.

0c36a852d0b2300040ea32c32888d354a54dddec  Update dlg_db_handler.c

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3688/files/78e270b3a8db48705d349771b7d155f237a04ca5..0c36a852d0b2300040ea32c32888d354a54dddec
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Fixed saving dialogs on shutdown that are already loaded at startup in db_mode 3 (PR #3688)

2023-12-22 Thread Dennis via sr-dev
@Den4t pushed 1 commit.

78e270b3a8db48705d349771b7d155f237a04ca5  Update dlg_db_handler.c

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3688/files/d1699ab62ebc0aa62c4acb87bf496e64b16f67e4..78e270b3a8db48705d349771b7d155f237a04ca5
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] Fixed saving dialogs on shutdown that are already loaded at startup in db_mode 3 (PR #3688)

2023-12-22 Thread Dennis via sr-dev
…tartup when using db_mode 3

- The dialogs that loaded at startup are not saved in DB on shutdown, and so 
not loaded at restart, fixes issue #3669

!-- 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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 # (replace  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/3688

-- Commit Summary --

  * dialog: fixed saving dialogs on shutdown that are already loaded at startup 
when using db_mode 3

-- File Changes --

M src/modules/dialog/dlg_db_handler.c (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3688.patch
https://github.com/kamailio/kamailio/pull/3688.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3688
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-21 Thread Dennis via sr-dev
I have tested all 3 DB modes with my latest modifications, the results look 
correct:

```
=== Test mode 1 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 1)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 1536
dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

>> terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

=== Mode 1 looks good.


=== Test mode 2 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_update_period", 5)


# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 1
dflags: 1538
dflags: 1667
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 1536
dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0


>> terminate calls

... after 5 seconds

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

=== Mode 2 looks good



=== Test mode 3 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 3)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


>> make 2 calls


# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1667
dflags: 1667

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

>>terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


=== Mode 3 loos good also.
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1866618262
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to 

[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-21 Thread Dennis via sr-dev
I have tested all 3 DB modes with my latest modifications, the results look 
correct:

```
=== Test mode 1 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 1)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 1536
dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

>> terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

=== Mode 1 looks good.


=== Test mode 2 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_update_period", 5)


# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 1
dflags: 1538
dflags: 1667
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 1536
dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
dflags: 0
dflags: 0


>> terminate calls

... after 5 seconds

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

=== Mode 2 looks good



=== Test mode 3 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 3)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


>> make 2 calls


# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1667
dflags: 1667

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
dflags: 1
dflags: 1

>>terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such 
file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd 
dlg.list|grep dflags
dlgs: 0


=== Mode 3 looks good also.
```




-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1866616202
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to 

[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-21 Thread Dennis via sr-dev
> You should probably only do this if:
> if(dlg_db_mode == DB_MODE_SHUTDOWN) {

Yes, i missed it, will test all the db modes.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1866163424
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-20 Thread Dennis via sr-dev
I have fixed dialog saving with folowing change:
https://github.com/Den4t/kamailio/commit/0ff12a0a0ab62123c7a37acb1c8f2f81d63751b5

Look like work as expected.

I haven't tested DMQ, but having studied the code in detail, i don't think this 
change will affect it in any way.
So, if the authors have no objections, I will do a PR.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1864510351
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-17 Thread Dennis via sr-dev
>>I did not investigate myself, but based on his descriptions dialogs that are 
>>created before the first restart is not kept >>during the second restart 
>>since they're no longer marked as "changed" or "new".

Exactly !

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1859074046
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-11 Thread Dennis via sr-dev
Hi !

Yes, you are right, not modified, but as i said above - "when in some resonable 
short time kamailio shutdowned again with active dialogs loaded at startup", 
this can happend for example if i whant to modify scenario when do some 
mistake, or pod in cloud is migrated for some reason (stop in one location snd 
start in enother), all this can happend during long life dialog sessios.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669#issuecomment-1850654380
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] Dialogs loaded from the DB are no longer saved. (Issue #3669)

2023-12-09 Thread Dennis via sr-dev
Hi !

### Description

I have а scenario where dialogs are saved at kamailio shutdown and loaded at 
startup, the dialog module related configuration:

modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 3)

When kamailio shut down first time all dialogs a saved in DB, upon startup they 
loaded as expected, but when in some resonable short time kamailio shutdowned 
again with active dialogs loaded at startup, they not saved in DB.

I think this happens because the dialog dflags in load_dialog_info_from_db 
function set to zero after dialog loaded, so
in update_dialog_dbinfo_unsafe such dialogs are ignored (no DLG_FLAG_NEW, no 
DLG_FLAG_CHANGED set).


 Debugging Data

Before shutdown:
kamcmd> dlg.list
{
h_entry: 521
h_id: 11463
ref: 2
call-id: 7z32YR9BCg
from_uri: sip:X@[::b081:1320::1:2c]
to_uri: sip:Y@[::0:201d::a1]
state: 4
start_ts: 1702137597
init_ts: 1702137595
end_ts: 0
duration: 18
timeout: 1702144797
lifetime: 7200
**dflags: 643**
sflags: 0
iflags: 0
.

After startup:
kamcmd> dlg.list
{
h_entry: 521
h_id: 11463
ref: 2
call-id: 7z32YR9BCg
from_uri: sip:X@[::b081:1320::1:2c]
to_uri: sip:Y@[::0:201d::a1]
state: 4
start_ts: 1702137597
init_ts: 1702137636
end_ts: 0
duration: 46
timeout: 1702144798
lifetime: 7201
**dflags: 0**
sflags: 0
iflags: 0



### Possible Solutions

At first glance, it's easy to set dlg->flags = DLG_FLAG_CHANGED (or may be to 
DLG_FLAG_NEW|DLG_FLAG_CHANGED) after loading from the database in 
load_dialog_info_from_db function, but I'm not sure if this could break 
anything else (e.g. DMQ).


### Additional Information

 * **Kamailio Version** - kamailio 5.7.2 (x86_64/linux)
 
 * **Operating System**:

Ubuntu 18.04.6 LTS


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3669
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] TOPOS callid masking (Issue #3606)

2023-10-26 Thread Dennis via sr-dev
Hi !

Thanks for the fix.
Can't check this right now.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3606#issuecomment-1780921759
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] TOPOS callid masking (Issue #3606)

2023-10-18 Thread Dennis via sr-dev


### Description
PKG memory errors when configured mask_callid in TOPOS.

### Troubleshooting

The poblem in detail desribed in mailing lists:
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg19997.html

### Possible Solutions

Right way to configure topos for callid masking is:

modparam("topoh", "use_mode", 1)
modparam("topos", "mask_callid", 1)
modparam("topoh", "mask_callid", 1)

We need to set mask_callid module parameter for topoh also. There is not a word 
about this in the documentation,
so docs correction needed.

### Additional Information

  * **Kamailio Version** - 5.7.X


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3606
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] auth_ephemeral: fix authentication with secrets added at runtime (PR #3390)

2023-03-10 Thread Dennis
@Den4t commented on this pull request.



> @@ -226,12 +230,22 @@ static inline int add_secret(str _secret_key)
memset(secret_struct, 0, sizeof (struct secret));
secret_struct->secret_key = _secret_key;
SECRET_LOCK;
-   if (secret_list != NULL)
+   if (secret_list == NULL)
+   {
+   secret_list = (struct secret **) shm_malloc(sizeof(struct 
secret *));
+   if (secret_list == NULL)
+   {
+   LM_ERR("unable to allocate shared memory\n");
+   return -1;

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3390#discussion_r1132239221
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] auth_ephemeral: fix authentication with secrets added at runtime (PR #3390)

2023-03-10 Thread Dennis
@Den4t pushed 1 commit.

855d009428b29d88e9a006ceb24a11a91d5e1bb8  fix: free secret_struct shm

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3390/files/26558b8a4836f76f76903a92f05ad1f925ae3be6..855d009428b29d88e9a006ceb24a11a91d5e1bb8
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] auth_ephemeral: fix authentication with secrets added at runtime (PR #3390)

2023-03-10 Thread Dennis
@Den4t commented on this pull request.



> @@ -226,12 +230,22 @@ static inline int add_secret(str _secret_key)
memset(secret_struct, 0, sizeof (struct secret));
secret_struct->secret_key = _secret_key;
SECRET_LOCK;
-   if (secret_list != NULL)
+   if (secret_list == NULL)
+   {
+   secret_list = (struct secret **) shm_malloc(sizeof(struct 
secret *));
+   if (secret_list == NULL)
+   {
+   LM_ERR("unable to allocate shared memory\n");
+   return -1;

Hi, Henning!

You're right, i missed this, will fix.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3390#discussion_r1132080253
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] auth_ephemeral: fix authentication with secrets added at runtime (PR #3390)

2023-03-09 Thread Dennis
- proper way to work with shm pointer to secret list

!-- 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 youre unsure about any of these, dont 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)
- [ ] 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 # (replace  with an open issue number)

 Description
In case of adding secrets at runtime with autheph.add_secret rpc, 
authentication with new secrets not work,
this is because rpc process modify local pointer to secret list, instead shm.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3390

-- Commit Summary --

  * auth_ephemeral: fix authentication with secrets added at runtime

-- File Changes --

M src/modules/auth_ephemeral/auth_ephemeral_mod.c (48)
M src/modules/auth_ephemeral/auth_ephemeral_mod.h (1)
M src/modules/auth_ephemeral/authorize.c (16)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3390.patch
https://github.com/kamailio/kamailio/pull/3390.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3390
You are receiving this because you are subscribed to this thread.

Message ID: kamailio/kamailio/pull/3...@github.com
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:ea4d7fee: uac: fixing REGISTER to use custom socket after 401/407

2021-10-25 Thread Dennis Yurasov
Module: kamailio
Branch: master
Commit: ea4d7fee43269ed50a55c444a0efdcc0dd64a95c
URL: 
https://github.com/kamailio/kamailio/commit/ea4d7fee43269ed50a55c444a0efdcc0dd64a95c

Author: Dennis Yurasov 
Committer: Dennis Yurasov 
Date: 2021-10-25T13:34:14+03:00

uac: fixing REGISTER to use custom socket after 401/407

- After receiving 401/407 uac does not use configured custom socket,
  second register send from first available address.

---

Modified: src/modules/uac/uac_reg.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/ea4d7fee43269ed50a55c444a0efdcc0dd64a95c.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ea4d7fee43269ed50a55c444a0efdcc0dd64a95c.patch

---

diff --git a/src/modules/uac/uac_reg.c b/src/modules/uac/uac_reg.c
index 1ea1b62135..85fe266c92 100644
--- a/src/modules/uac/uac_reg.c
+++ b/src/modules/uac/uac_reg.c
@@ -1011,6 +1011,20 @@ void uac_reg_tm_callback( struct cell *t, int type, 
struct tmcb_params *ps)
uac_r.cb  = uac_reg_tm_callback;
/* Callback parameter */
uac_r.cbp = (void*)uuid;
+
+   if(ri->socket.s != NULL && ri->socket.len > 0) {
+/* custom socket */
+LM_DBG("using custom socket %.*s to send request\n",
+ri->socket.len, ri->socket.s);
+uac_r.ssock = >socket;
+} else {
+/* default socket */
+if(uac_default_socket.s != NULL && 
uac_default_socket.len > 0) {
+LM_DBG("using configured default_socket to 
send request\n");
+uac_r.ssock = _default_socket;
+}
+}
+
ret = uac_tmb.t_request_within(_r);
 
if(ret<0) {


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] uac: fixing REGISTER to use custom socket after 401/407 (PR #2902)

2021-10-25 Thread Dennis
- After receiving 401/407 uac does not use configured custom socket,
  second register send from first available address.

!-- 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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [x] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 # (replace  with an open issue number)

 Description
uac module does not use configured custom socket when send second REGISTER 
after receiving 401/407,
so packet send via first suitable socket in config with wrong source address, 
some carriers drops this packets
because they have configured ACLs.


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/2902

-- Commit Summary --

  * https://github.com/kamailio/kamailio/pull/2902/commits/ea4d7fee43269ed50a55c444a0efdcc0dd64a95c;>uac:
 fixing REGISTER to use custom socket after 401/407

-- File Changes --

M src/modules/uac/uac_reg.c (14)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2902.patch
https://github.com/kamailio/kamailio/pull/2902.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/2902
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-20 Thread Dennis
> Somehow I missed the comment without contact -- when I looked quickly at the 
> code, the xavu is used if contact address is found, being after this piece of 
> code:
> 
> ```
>   if(dir==TPS_DIR_DOWNSTREAM) {
>   sv = td->bs_contact;
>   } else {
>   sv = td->as_contact;
>   }
>   if(sv.len<=0) {
>   /* no contact - skip */
>   return 0;
>   }
> ```
> 
> But I do not use this mode with xavu and don't know what is supposed to do. I 
> just wanted to give some hints.

I think that contact variables filled by tps_pack_message in tps_request_sent 
function from Record-Route header:
```
Sep 16 13:55:16 gw481 /usr/sbin/kamailio[11425]: DEBUG: {1 1 ACK 
1-12131@87.250.237.98} topos [tps_msg.c:1006]: tps_request_sent(): handling 
outgoing request (1, 0)
Sep 16 13:55:16 gw481 /usr/sbin/kamailio[11425]: DEBUG: {1 1 ACK 
1-12131@87.250.237.98} topos [tps_msg.c:415]: tps_pack_message(): compacted 
headers - x_via1: [SIP/2.0/UDP 
[2a02:6b8:0:6::5];branch=z9hG4bK7bb2.7dbc336ffe6a81233e57c387950431c8.0](83) - 
x_via2: [SIP/2.0/UDP 
87.250.237.98:5070;received=87.250.237.98;rport=5070;branch=z9hG4bK-12131-1-5;sig=4100ba9a](102)
 - x_vbranch1: [z9hG4bK7bb2.7dbc336ffe6a81233e57c387950431c8.0](46)
Sep 16 13:55:16 gw481 /usr/sbin/kamailio[11425]: DEBUG: {1 1 ACK 
1-12131@87.250.237.98} topos [tps_msg.c:483]: tps_pack_message(): single record 
routing by proxy
Sep 16 13:55:16 gw481 /usr/sbin/kamailio[11425]: DEBUG: {1 1 ACK 
1-12131@87.250.237.98} topos [tps_msg.c:537]: tps_pack_message(): compacted 
headers - a_rr: [](0) - b_rr: [](0) - s_rr: 
[](62)
Sep 16 13:55:16 gw481 /usr/sbin/kamailio[11425]: DEBUG: {1 1 ACK 
1-12131@87.250.237.98} topos [tps_msg.c:542]: tps_pack_message(): compacted 
headers - as_contact: 
[sip:87.250.237.98:5070;lr;ftag=1c1658248864;did=626.1edbf0d5](60) - 
bs_contact: [sip:87.250.237.98:5070;lr;ftag=1c1658248864;did=626.1edbf0d5](60)
```


-- 
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/2852#issuecomment-922864587___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-20 Thread Dennis
Hi, @miconda !

I do not enable rr_update, but can confirm that with removing Record-Route from 
in-Dalog messages topos errors are gone. 
For now it seems to be a solution.


-- 
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/2852#issuecomment-922771433___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-16 Thread Dennis
Didn't I show in the examples above that contact has nothing to do with it?

Aniway again,
no Contact with Record-Route in ACK, have error in topos:
[call4.log](https://github.com/kamailio/kamailio/files/7177215/call4.log)
[dump4.txt](https://github.com/kamailio/kamailio/files/7177216/dump4.txt)

no Contact, no Record-Route, no error:
[call5.log](https://github.com/kamailio/kamailio/files/7177218/call5.log)
[dump5.txt](https://github.com/kamailio/kamailio/files/7177219/dump5.txt)

>> and the set that xavu
I do belive if i set xavu in in-Dialog messages topos will be work correctly, 
but as sayd @henningw:

-- 
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/2852#issuecomment-920814392___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-14 Thread Dennis
Hi !

We have different carriers, some of them send contact in ACK & BYE, some not, 
but problem persist only when in-Dialog
messages have Record-Route header. I can't put here real conversations, but can 
reproduce signaling in lab.

Here is the signaling & debug log without contact in ACK, with Record-Route 
header present.
[call1.log](https://github.com/kamailio/kamailio/files/7163114/call1.log)
[dump1.txt](https://github.com/kamailio/kamailio/files/7163118/dump1.txt)



-- 
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/2852#issuecomment-919254561___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Rexord-Rourte header. (#2852)

2021-09-13 Thread Dennis


Hi !

topos+redis used in the folowing configuration:


modparam("ndb_redis", "server", "REDIS_SERVER")
modparam("ndb_redis", "init_without_redis", 1)
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "srv1")
modparam("topos", "contact_mode", 2)
modparam("topos", "xavu_cfg", "_tps_")
modparam("topos", "xavu_field_a_contact", "a_contact")
modparam("topos", "xavu_field_b_contact", "b_contact")
modparam("topos", "xavu_field_contact_host", "contact_host")

In the inital INVITE  xavu variables a_contact and b_contact are set by script, 
topos work as expected at this point,
but when the following in-dalog messages from upstream have Record-Route 
header, topos fails with error message:

Sep 13 18:50:01 gw481 /usr/sbin/kamailio[29874]: ERROR: {1 1 ACK 
1-20643@87.250.237.98} topos [tps_storage.c:331]: tps_storage_fill_contact(): 
could not evaluate a_contact xavu
Sep 13 18:50:01 gw481 /usr/sbin/kamailio[29874]: ERROR: {1 1 ACK 
1-20643@87.250.237.98} topos [tps_storage.c:604]: tps_storage_record(): failed 
to store

In case of absent Record-Route headers the are no errors.

 Debugging Data

Signaling dump and debug log in attachment.

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
kamailio 5.5.1 (x86_64/linux) 
```

* **Operating System**:



```
Ubuntu 18.04.5 LTS
```
[dump.txt](https://github.com/kamailio/kamailio/files/7157118/dump.txt)
[call.log](https://github.com/kamailio/kamailio/files/7157120/call.log)

-- 
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/2852___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] ndb_redis: fix SIGSEGV in redisc_check_auth (#2834)

2021-08-24 Thread Dennis
Hi !

This issue appears when ndb_redis module connect to redis via proxy, in my case 
haproxy.
Haproxy keeps front socket always open, when all backend redis servers become 
unavailable, haproxy just send RST to front,
redisCommand function in tis case return NULL poiner, redisc_check_auth try to 
dereference it without NULL checking.

kamailio log:
`kernel: [7250430.508827] kamailio[21749]: segfault at 0 ip 7f00d7bb106f sp 
7fffc523c620 error 4 in ndb_redis.so[7f00d7b94000+36000]`

gdb:
```
# gdb /usr/sbin/kamailio core
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show 
copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
Type show configuration for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/;.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/;.
For help, type help.
Type apropos word to search for commands related to 
word...
Reading symbols from /usr/sbin/kamailio...(no debugging symbols found)...done.
[New LWP 21752]
[Thread debugging using libthread_db enabled]
Using host libthread_db library 
/lib/x86_64-linux-gnu/libthread_db.so.1.
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  0x7f00d7bb106f in redisc_check_auth () from 
/usr/lib64/kamailio/modules/ndb_redis.so
(gdb) bt
#0  0x7f00d7bb106f in redisc_check_auth () from 
/usr/lib64/kamailio/modules/ndb_redis.so
#1  0x7f00d7b9937a in redisc_init () from 
/usr/lib64/kamailio/modules/ndb_redis.so
#2  0x7f00d7bb4300 in print_redis_reply () from 
/usr/lib64/kamailio/modules/ndb_redis.so
#3  0x561825796935 in ?? ()
#4  0x561825796550 in ?? ()
#5  0x561825796550 in ?? ()
#6  0x561825796550 in ?? ()
#7  0x561825796550 in ?? ()
#8  0x561825796550 in ?? ()
#9  0x561825796550 in ?? ()
#10 0x561825796550 in ?? ()
#11 0x561825796550 in ?? ()
#12 0x561825796550 in ?? ()
#13 0x561825796550 in ?? ()
#14 0x561825796550 in ?? ()
#15 0x561825796550 in ?? ()
#16 0x561825796550 in ?? ()
#17 0x56182579722c in init_child ()
#18 0x5618256f4520 in fork_process ()
#19 0x5618255cfbf3 in main_loop ()
#20 0x5618255dd095 in main ()
```


!-- 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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [x] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 # (replace  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/2834

-- Commit Summary --

  * ndb_redis: fix SIGSEGV in redisc_check_auth

-- File Changes --

M src/modules/ndb_redis/redis_client.c (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2834.patch
https://github.com/kamailio/kamailio/pull/2834.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/2834

Re: [sr-dev] [kamailio/kamailio] rtpengine: remove square brackets from IPv6 address for getaddrinfo (#2685)

2021-03-22 Thread Dennis
@miconda 
>>have you checked that setting 0 in place of ] is not having other side 
>>effects? I didn't notice any restore.

Yes, hp - is a pointer to pkg_malloc-ed hostname variable, this var is freed 
right after getaddrinfo and not used any more.
I tested this patch localy, work as expected.



-- 
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/2685#issuecomment-803997847___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] rtpengine: remove square brackets from IPv6 address for getaddrinfo (#2685)

2021-03-21 Thread Dennis
rtpengine: IPv6 address in square brackets interpreted as FQDN.

- After loading from DB rn_address is in form: [x:x:x:x:x:x:x:x]:, 
getaddrinfo function expect ipv6 in node argument without square brackets, 
otherwise, the argument is interpreted as FQDN.

!-- 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 youre unsure about any of these, dont 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)
- [ ] 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 # (replace  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/2685

-- Commit Summary --

  * rtpengine: remove square brackets from IPv6 address for getaddrinfo function

-- File Changes --

M src/modules/rtpengine/rtpengine.c (15)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2685.patch
https://github.com/kamailio/kamailio/pull/2685.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/2685
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Fix in parsing IPv6 address:port (#2592)

2021-01-04 Thread Dennis
Hello, @miconda !

This is just ordinary fix for properly loading from DB list of nodes with IPv6 
adresses, nothig special.



-- 
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/2592#issuecomment-754043015___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] Fix in parsing IPv6 address:port (#2592)

2020-12-30 Thread Dennis
!-- Kamailio Pull Request Template --
This patch fix wrong parsing the pair of IPv6 addr:port in rtpengine module, 
when loading node information from database.
!--
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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 # (replace  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/2592

-- Commit Summary --

  * Fix in parsing IPv6 address:port

-- File Changes --

M src/modules/rtpengine/rtpengine.c (9)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2592.patch
https://github.com/kamailio/kamailio/pull/2592.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/2592
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev