#### Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] 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 - [*] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description Fix relaying MSRP messages to IPv6 uri. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2472
-- Commit Summary --
* msrp: fixed IPv6 addrees parsing
-- File Changes --
M src/modules/msrp/msrp_parser.c (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2472.patch https://github.com/kamailio/kamailio/pull/2472.diff
Can you explain where the problem actually happens? Because the patch does not seem right, being in the URI parser, making host shorter (skipping [ ]), but that is not correct, and can have other side effects. If routing is not working, then the fix has to be done in the routing part, not in the SIP uri host parsing.
@sergey-safarov pushed 1 commit.
9dfd940b765e2b2412750eb38ef4120b4db3eaa2 msrp: fixed $msrp(srcaddr) output when used IPv6
The issue happens when Kamailio receive MSRP message like ``` MSRP e1df91d477cc632a SEND To-Path: msrp://3.236.25.4:5060/s.57471.1.1260517458;tcp msrp://[2600:1f18:63e1:6937:c504:55a1:e141:6810]:2855/e3e5c58412a3479fb007238b3729403a;tcp From-Path: msrp://192.168.122.2:2855/88fafa933e5144ffa59e;tcp Message-ID: f7d1b51d7ec9ad2d Byte-Range: 1-365/365 Success-Report: no Failure-Report: no Content-Type: message/cpim
From: +12134445566 sip:+12134445566@wv.nga911.com To: sip:+13044598081@wv.nga911.com DateTime: 2020-09-06T11:07:09.980093+03:00
MIME-Version: 1.0 Content-Type: application/im-iscomposing+xml
<?xml version='1.0' encoding='UTF-8'?> <isComposing xmlns="urn:ietf:params:xml:ns:im-iscomposing"><state>active</state><contenttype>text</contenttype></isComposing> ```
Kamailio acts as MSRP relay between IPv4 and IPv6 clients.
@sergey-safarov pushed 1 commit.
86324f26c1a7ee4e7787225761a49052f0b0a0e0 removed not nessary brackets striping
I removed brackets striping and make tests - also work.
Thanks for the details. I will have to check the code and see if this patch covers it properly, somehow I am not confident in just jumping to `]` for the case of ipv6 in the uri.
Can you test with commit 1cda029, I did a different approach to be sure there is `[` at beginning of host part, not to find `]` in uri parameters. The for the PV field, there is a function that already returns the ipv6 address with []. I haven't tested, thus feedback on how it works is appreciated in order to backport.
I made test of 9645be commit (current master), now msrp messages properly parsed and relayed via IPv6.
Thanks! The commits can be backported. If you need them quickly, you can go ahead and backport, if not I will do it during the next days.
Closed #2472.