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

Russell Bryant russell at digium.com
Fri Oct 1 15:11:42 CDT 2010


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

Review request for Asterisk Developers.


Summary
-------

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 iax_peer structure needed to be changed to an ast_sockaddr.  The patch is pretty much fixing up all of the ripple effects of changing that part of the peer structure.


This addresses bug 17902.
    https://issues.asterisk.org/view.php?id=17902


Diffs
-----

  /branches/1.8/channels/chan_iax2.c 289543 

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


Testing
-------

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 registration, including the code 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.


Thanks,

Russell




More information about the asterisk-dev mailing list