[reSIProcate] ipv6 and maddr

Scott Godin sgodin at sipspectrum.com
Mon Jun 9 16:02:33 CDT 2014


Thank Bjorn!  I have committed this fix.

Scott


On Mon, Jun 9, 2014 at 11:06 AM, Björn Andersson <bjorn.andersson at aastra.com
> wrote:

> We are trying to run ipv6 towards Lync, and we get a contact in a
> reliable provisional like this:
> Contact: <sip:lync-2013-se2.aas.rnd.se.aastra.com:5068
> ;transport=Tcp;maddr=[fde3:c7e4:2164:66:20dc:ef02:ce6f:85be]
>
> when sending prack the dns resolving will not discover that target is an
> ip address because of the brackets:
> Looking up dns entries for sip:lync-2013-se2.aas.rnd.se.aastra.com:5068
> ;transport=Tcp;maddr=[fde3:c7e4:2164:66:20dc:ef02:ce6f:85be]
>
> Following patch fixes the problem for us, but maybe there is a better
> solution:
>
> *** DnsResult.cxx.orig  2014-06-09 16:53:38.741342891 +0200
> --- DnsResult.cxx       2014-06-09 16:58:02.573343675 +0200
> *************** DnsResult::lookupInternal(const Uri& uri
> *** 279,284 ****
> --- 279,289 ----
>      //assert(uri.scheme() == Symbols::Sips || uri.scheme() ==
> Symbols::Sip);
>      mSips = (uri.scheme() == Symbols::Sips);
>      mTarget = (!mSips && uri.exists(p_maddr)) ? uri.param(p_maddr) :
> uri.host();
> +    // remove brackets around ipv6 address if present
> +    if (mTarget[0] == '[' && mTarget[mTarget.size()-1] == ']')
> +    {
> +       mTarget = mTarget.substr(1,mTarget.size()-2);
> +    }
>      mSrvKey = Symbols::UNDERSCORE + uri.scheme().substr(0,
> uri.scheme().size()) + Symbols::DOT;
>      bool isNumeric = DnsUtil::isIpAddress(mTarget);
>
>
> Cheers
> Björn A.
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140609/c9d819f0/attachment.htm>


More information about the resiprocate-devel mailing list