[SR-Users] fix_nated_contact and IPv6

Sebastian Damm damm at sipgate.de
Fri Jan 23 10:24:11 CET 2015


Hi Daniel, Hi Klaus,

On Thu, Jan 22, 2015 at 10:48 PM, Daniel-Constantin Mierla <
miconda at gmail.com> wrote:

> 1) I guess the initial author know there is no nat in ipv6, so he didn't
> bother with. I just pushed a patch for it in master (814c08f3), if
> tested and reported to work ok, it can be backported
>

Thanks for the patch, I just patched our 4.1.3 with it, and now the Contact
IP is surrounded by square brackets. So I guess it can be backported.


> 2) the contact uri example in the first email is perhaps not properly
> reflecting the contact uri that was generated, because it should have
> been with the ip address and the port. It seems to be only the ip
> address. If there was an omission, that's ok, because I expect the uri
> parsing error is due to hostpart having the port following the ipv6
> address -- that requires the ipv6 between []. If the port was missing,
> that can be another issue, but the code shows the port is always added
> and it wouldn't worked at all so far without it.
>

Sorry, that was my mistake. The request came in from an odd port, so I
removed it while adjusting the line for the mailing list. Of course, after
fix_nated_contact the port is appended.

3) use set_contact_alias() if use modules that need the new contact
> (like dialog, presence, ...) for later usage. The *contact_alias()
> function don't change the host/port part, they just add a new parameter,
> so it would have been safe with or without []. Anyhow, the code adds []
> if the address is ipv6
>

I have had a look into these functions, and they seem a lot more
appropriate (and do work with IPv6). Guess they haven't been there, when we
originally built that part of our configuration back in 2007. I think we
will use those functions now.

Thanks for the quick help.

Best Regards,
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150123/d038073c/attachment.html>


More information about the sr-users mailing list