[asterisk-dev] [Code Review] Add the ability for ast_find_ourip to return IPV4, IPV6 or both.

Simon Perreault simon.perreault at viagenie.ca
Thu Oct 14 10:17:01 CDT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/973/#review2839
-----------------------------------------------------------

Ship it!


But keep in mind that this function should die. It pretends to return "our IP". That is impossible, because we may have multiple IPs. Even without taking IPv6 into account, we may have multiple IPv4 addresses. Adding IPv6 just makes it worse.

- Simon


On 2010-10-14 10:09:34, pabelanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/973/
> -----------------------------------------------------------
> 
> (Updated 2010-10-14 10:09:34)
> 
> 
> Review request for Asterisk Developers and David Vossel.
> 
> 
> Summary
> -------
> 
> While testing dvossel gtalk_fixup branch I was not able to make outbound calls.  After a little debugging I found jabber was using my IPV6 address, not IPV4.  When using bindaddr=0.0.0.0 it is possible for ast_find_ourip() to return both IPv6 and IPv4 results. I added a family parameter give you the ability to choose.
> 
> Since jabber / gtalk does not support IPv6, we should only return IPv4 results.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/include/asterisk/acl.h 291757 
>   /branches/1.8/main/acl.c 291757 
>   /branches/1.8/channels/chan_sip.c 291757 
>   /branches/1.8/channels/chan_h323.c 291757 
>   /branches/1.8/channels/chan_jingle.c 291757 
>   /branches/1.8/channels/chan_gtalk.c 291757 
> 
> Diff: https://reviewboard.asterisk.org/r/973/diff
> 
> 
> Testing
> -------
> 
> compiled and confirmed gtalk worked as expected.
> 
> 
> Thanks,
> 
> pabelanger
> 
>




More information about the asterisk-dev mailing list