[asterisk-dev] Re: [IAX 0007874]: [patch] chan_iax2 ignores "sourceaddress" when "bindaddr" is set to INADDR_ANY (the default).

Stevenson stevens at stevens.it
Sun Apr 1 08:06:35 MST 2007


Hello Russell.

bugs at digium.com wrote:
> ----------------------------------------------------------------------
>  russell - 03-27-07 13:10
> ----------------------------------------------------------------------
> This patch has been merged into 1.2, 1.4, and trunk in reivisions 59258,
> 59259, and 59260.  However, I did not merge the changes to netsock.c,
> because I did not see why they were necessary.  If you feel they should be
> added, feel free to contact me on the asterisk-dev mailing list to discuss
> it.
>
> Thanks!

I cannot bind to a specific IP address, without set the SO_REUSEADDR
flag to the UDP socket, when INADDR_ANY already bounded. So, if I am
not wrong, the patch isn't useful without that change.

This is the only reason to modify netsock.c .

> A "netstat -na | grep 4569" shows:
>
> udp        0      0 192.168.1.22:4569       0.0.0.0:*
> udp        0      0 192.168.1.20:4569       0.0.0.0:*
> udp        0      0 172.16.0.1:4569         0.0.0.0:*
> udp        0      0 0.0.0.0:4569            0.0.0.0:*
>
> last socket in this list is the one opened as a result of a "bindaddr"
> setting
> and the others are there because of corresponding "sourceaddress"
> directive.
>


Thank You!
Stefano



More information about the asterisk-dev mailing list