[asterisk-commits] kmoore: trunk r400684 - in /trunk: ./ res/res_rtp_asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 8 10:46:18 CDT 2013
Author: kmoore
Date: Tue Oct 8 10:46:16 2013
New Revision: 400684
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400684
Log:
Fix STUN crash when using IPv6 any address
Ensure that when chan_sip binds to the IPv6 any address ([::]), IPv4
candidates are also added.
(closes issue ASTERISK-21917)
Reported by: Torrey Searle
Patches:
0023_ipv6_stun_crash.patch uploaded by Torrey Searle (License 5334)
........
Merged revisions 400681 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 400682 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/res_rtp_asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_rtp_asterisk.c?view=diff&rev=400684&r1=400683&r2=400684
==============================================================================
--- trunk/res/res_rtp_asterisk.c (original)
+++ trunk/res/res_rtp_asterisk.c Tue Oct 8 10:46:16 2013
@@ -1661,7 +1661,13 @@
unsigned int count = PJ_ARRAY_SIZE(address), pos = 0;
/* Add all the local interface IP addresses */
- pj_enum_ip_interface(ast_sockaddr_is_ipv4(addr) ? pj_AF_INET() : pj_AF_INET6(), &count, address);
+ if (ast_sockaddr_is_ipv4(addr)) {
+ pj_enum_ip_interface(pj_AF_INET(), &count, address);
+ } else if (ast_sockaddr_is_any(addr)) {
+ pj_enum_ip_interface(pj_AF_UNSPEC(), &count, address);
+ } else {
+ pj_enum_ip_interface(pj_AF_INET6(), &count, address);
+ }
for (pos = 0; pos < count; pos++) {
pj_sockaddr_set_port(&address[pos], port);
More information about the asterisk-commits
mailing list