chan_iax2: Reload of iax peer results in loss of host address/port
authorRichard Begg <asterisk@meric.id.au>
Tue, 14 Mar 2017 21:51:41 +0000 (08:51 +1100)
committerRichard Begg <asterisk@meric.id.au>
Tue, 14 Mar 2017 22:01:04 +0000 (16:01 -0600)
commit0dc007e94df4be041a984da5ed5346617127eb62
tree471fed94afcffcf4b74c2f8bc14fbaf7c4843624
parent2b611a8d932a30a95675ac63bfd7c8ea2d3d8ad7
chan_iax2: Reload of iax peer results in loss of host address/port

When using a non-dynamic peer address, build_peer() invalidates the
peer address structure by setting the address family to unspecified.
However, if dnsmgr is enabled, the subsequent call to ast_dnsmgr_lookup()
will not amend the peer address if the cache is still valid, resulting
in peer connectivity failures.
To fix this, we call ast_dnsmgr_refresh() instead.

ASTERISK-26865

Change-Id: Id8a89a2f771ebbaf32255a35fe596a6dcb97a082
channels/chan_iax2.c