[asterisk-dev] [Code Review] Resolve dnsmgr memory corruption caused by chan_iax2
David Vossel
dvossel at digium.com
Tue Oct 5 11:47:19 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/965/#review2809
-----------------------------------------------------------
Ship it!
Nice work!
- David
On 2010-10-01 15:39:56, Russell Bryant wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/965/
> -----------------------------------------------------------
>
> (Updated 2010-10-01 15:39:56)
>
>
> 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 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
> -------
>
> 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