Skip Menu |

This queue is for tickets about the Net-SIP CPAN distribution.

Report information
The Basics
Id: 120909
Status: resolved
Priority: 0/
Queue: Net-SIP

People
Owner: Steffen_Ullrich [...] genua.de
Requestors: richard.carver [...] cloudmont.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Dual stack StatelessProxy contact rewriting
Date: Mon, 3 Apr 2017 17:22:43 +0000
To: "bug-Net-SIP [...] rt.cpan.org" <bug-Net-SIP [...] rt.cpan.org>
From: Richard Carver <richard.carver [...] cloudmont.co.uk>
When I create Legs I specify a contact which identifies the host by name instead of IP. I create two legs with the same contact, one with an IPv4 address and one with an IPv6 address. I publish an A and an AAAA for the hostname to cover both IPv4 and IPv6. The scenario causing an issue is using the default contact rewrite function where my proxy prefers to use IPv6 when it sends a request and the remote side sometimes used IPv4 to respond depending on the exact scenario. I wonder whether implementing dual-stack support this way is a bad idea, but if you think it is a valid scenario then I propose to update Statelessproxy.pm :: _default_rewrite_contact so that instead of comparing the leg keys it compares the leg contacts before deciding to reject the rewrite due to using a different leg. I have been using a customised version of _default_rewrite_contact on the older version of the module with the leg check removed and my scenario worked.
Am Mo 03. Apr 2017, 14:56:35, richard.carver@cloudmont.co.uk schrieb: Show quoted text
> When I create Legs I specify a contact which identifies the host by > name instead of IP. I create two legs with the same contact, one with > an IPv4 address and one with an IPv6 address. I publish an A and an > AAAA for the hostname to cover both IPv4 and IPv6. > > The scenario causing an issue is using the default contact rewrite > function where my proxy prefers to use IPv6 when it sends a request > and the remote side sometimes used IPv4 to respond depending on the > exact scenario. > > I wonder whether implementing dual-stack support this way is a bad > idea, but if you think it is a valid scenario then I propose to update > Statelessproxy.pm :: _default_rewrite_contact so that instead of > comparing the leg keys it compares the leg contacts before deciding to > reject the rewrite due to using a different leg. I have been using a > customised version of _default_rewrite_contact on the older version of > the module with the leg check removed and my scenario worked.
I think it is a valid scenario to have multiple legs for a single domain because you have multiple IP addresses for this domain. I've tried to make the necessary changes but I have no test setup for this case yet. Could you check if the changes in branch https://github.com/noxxi/p5-net-sip/tree/rt120909 work within your use case?
Subject: RE: [rt.cpan.org #120909] Dual stack StatelessProxy contact rewriting
Date: Mon, 20 Nov 2017 15:03:11 +0000
To: "bug-Net-SIP [...] rt.cpan.org" <bug-Net-SIP [...] rt.cpan.org>
From: Richard Carver <richard.carver [...] cloudmont.co.uk>
Thanks for the branch. I confirm that this change works with my use-case. Show quoted text
-----Original Message----- From: Steffen Ullrich via RT [mailto:bug-Net-SIP@rt.cpan.org] Sent: 08 August 2017 10:32 To: Richard Carver <richard.carver@cloudmont.co.uk> Subject: [rt.cpan.org #120909] Dual stack StatelessProxy contact rewriting <URL: https://rt.cpan.org/Ticket/Display.html?id=120909 > Am Mo 03. Apr 2017, 14:56:35, richard.carver@cloudmont.co.uk schrieb:
> When I create Legs I specify a contact which identifies the host by > name instead of IP. I create two legs with the same contact, one with > an IPv4 address and one with an IPv6 address. I publish an A and an > AAAA for the hostname to cover both IPv4 and IPv6. > > The scenario causing an issue is using the default contact rewrite > function where my proxy prefers to use IPv6 when it sends a request > and the remote side sometimes used IPv4 to respond depending on the > exact scenario. > > I wonder whether implementing dual-stack support this way is a bad > idea, but if you think it is a valid scenario then I propose to update > Statelessproxy.pm :: _default_rewrite_contact so that instead of > comparing the leg keys it compares the leg contacts before deciding to > reject the rewrite due to using a different leg. I have been using a > customised version of _default_rewrite_contact on the older version of > the module with the leg check removed and my scenario worked.
I think it is a valid scenario to have multiple legs for a single domain because you have multiple IP addresses for this domain. I've tried to make the necessary changes but I have no test setup for this case yet. Could you check if the changes in branch https://github.com/noxxi/p5-net-sip/tree/rt120909 work within your use case?
Am Mo 20. Nov 2017, 10:03:42, richard.carver@cloudmont.co.uk schrieb: Show quoted text
> Thanks for the branch. I confirm that this change works with my use- > case.
The changes are in commit 7161654 now and will be released with the next version.