[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:
https://reviewboard.asterisk.org/r/965/
-----------------------------------------------------------
(Updated 2010-10-01 15:39:56.825706)
Review request for Asterisk Developers.
Changes
-------
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.
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 (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.
Thanks,
Russell
More information about the asterisk-dev
mailing list