[asterisk-scf-dev] PJSIP TCP transport

Kevin P. Fleming kpfleming at digium.com
Mon Nov 29 14:29:53 CST 2010


On 11/29/2010 02:19 PM, Marc Blanchet wrote:
> Le 10-11-29 15:12, Mark Michelson a écrit :
>> On 11/29/2010 02:03 PM, Marc Blanchet wrote:
>>> - when I saw the use of link-local, then I jumped on it.
>>> - fact: link-locals need an interface id to become unambiguous (from the
>>> stack point of view, even if you only have one interface).
>>> for example: ping6 fe80::1234 does not work by default. you need to
>>> ping6 fe80::1234%en1 or some option flag to ping6 telling which
>>> interface to send to.
>>> - hypothesis, you are hitting that problem in your code/tests.
>>> - proposed idea: try first using global address space in your test or
>>> any unicast address space (Unique local is fine too). If it works, then
>>> you need to look at how to work with link-locals in your structs/code.
>>>
>>> a suggestion.
>>>
>>> Marc.
>>>
>> Interesting. In this case, it's actually pjlib that is selecting the
>> address automatically as part of its pj_gethostip() function. I can look
>> into tweaking things and setting up a unique local address on this box
>> to see if that fixes the issue. Thanks for the quick feedback!
>
> - what happens is overall, the interface identification is not well
> managed within code, since it is a really new and special artefact of
> ipv6. the best way to avoid this is always to treat the address as an
> opaque handle which carries everything it needs (including an interface
> pointer when a link-local address). That is the recommendation of my
> good friend Itojun who wrote most of the BSD IPv6 stack. but that is the
> "good practice". The reality in code is often different... specially for
> code that is really processing addresses such as SIP/SDP...
>
> any way, might not be the problem you are having. But I would suggest to
> not use link-locals when you do code/unit tests in general, to avoid
> these possible issues.

I have very little practical experience, but I haven't yet seen a usage 
for link-locals that made a lot of sense. Site-locals can be easily 
attached to your interfaces and don't have the multiple-interface 
problem, and aren't globally routable so they are just as 'safe'.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming at digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-scf-dev mailing list