[asterisk-commits] kmoore: branch 10 r335321 - in /branches/10: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 12 08:27:07 CDT 2011


Author: kmoore
Date: Mon Sep 12 08:27:04 2011
New Revision: 335321

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=335321
Log:
Merged revisions 335320 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r335320 | kmoore | 2011-09-12 08:25:42 -0500 (Mon, 12 Sep 2011) | 9 lines
  
  Prevent IAX2 from getting IPv6 addresses via DNS
  
  IAX2 does not support IPv6 and getting such addresses from DNS can cause error
  messages on the remote end involving bad IPv4 address casts in the presence of
  IPv6/IPv4 tunnels.  This patch ensures that IAX2 will not encounter IPv6
  addresses via DNS queries.
  
  (closes issue ASTERISK-18090)
........

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_iax2.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_iax2.c?view=diff&rev=335321&r1=335320&r2=335321
==============================================================================
--- branches/10/channels/chan_iax2.c (original)
+++ branches/10/channels/chan_iax2.c Mon Sep 12 08:27:04 2011
@@ -8584,6 +8584,7 @@
 	if (!(reg = ast_calloc(1, sizeof(*reg))))
 		return -1;
 
+	reg->addr.ss.ss_family = AF_INET;
 	if (ast_dnsmgr_lookup(hostname, &reg->addr, &reg->dnsmgr, srvlookup ? "_iax._udp" : NULL) < 0) {
 		ast_free(reg);
 		return -1;
@@ -12429,6 +12430,7 @@
 		peer->expire = -1;
 		peer->pokeexpire = -1;
 		peer->sockfd = defaultsockfd;
+		peer->addr.ss.ss_family = AF_INET;
 		if (ast_string_field_init(peer, 32))
 			peer = peer_unref(peer);
 	}




More information about the asterisk-commits mailing list