[asterisk-dev] [Code Review] Resolve dnsmgr memory corruption caused by chan_iax2

Russell Bryant russell at digium.com
Fri Oct 1 15:39:57 CDT 2010

This is an automatically generated e-mail. To reply, visit:

(Updated 2010-10-01 15:39:56.825706)

Review request for Asterisk Developers.


Update description and testing sections to note the fixes to registration handling, as well

Summary (updated)

chan_iax2 registered a stack buffer with the dnsmgr, which stores it off to keep it up to date using periodic DNS lookups.  This is bad and led to bizarre failures.  

This was a regression in the merge of IPv6 support.  The dnsmgr API now takes an ast_sockaddr instead of a sockaddr_in structure.  To fix this, the address structure in the iax2_peer and iax2_registry structures needed to be changed to an ast_sockaddr.  The patch is pretty much fixing up all of the ripple effects of those changes.

This addresses bug 17902.


  /branches/1.8/channels/chan_iax2.c 289543 

Diff: https://reviewboard.asterisk.org/r/965/diff

Testing (updated)

I set up a few peers using dnsmgr in both IAX2 and SIP and verified that the addresses were populated properly.  I tested an IAX2 inbound and outbound registrations, including the code that was refactored that pulls the registration data back out of astdb.  I also ran an IAX2 call.  I did all of this under valgrind and found no problems.



More information about the asterisk-dev mailing list