[asterisk-dev] [Code Review] disallow tcp/tls transport in peers when tcpenable=no
wdoekes
reviewboard at asterisk.org
Sun Nov 13 07:37:42 CST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1585/
-----------------------------------------------------------
Review request for Asterisk Developers.
Summary
-------
When tcpenable=no, the sip_tcp_desc.local_address is set to null and no
listening socket is opened. Nevertheless peers are allowed to have tcp
and/or tls transport. The ast_sip_ouraddrfor() returns NULL for those
cases, and the SIP packets come out with "(null)" where the local
address should be.
The fix: when tcpenable=no, no attempt should be made to use tcp/tls
transports. I've added a warning and removed the invalid transports.
Note that the devices will fall back to the only other option: UDP
Three fixes:
(1) If tcpenable=no, then the [general] transports will be set to 'udp'.
(2) If tcpenable=no, peer transports will default to the [general]
transports.
(3) If an invalid peer transport is encountered, the message will state
that it uses *the* *defaults* (it said 'udp', but that was incorrect).
This addresses bug ASTERISK-18837.
https://issues.asterisk.org/jira/browse/ASTERISK-18837
Diffs
-----
/branches/1.8/channels/chan_sip.c 344952
Diff: https://reviewboard.asterisk.org/r/1585/diff
Testing
-------
Set the [general] and peer flags and checked that they're still correct if tcpenabled=yes and that they're set to udp when tcpenabled=no.
Thanks,
wdoekes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111113/57f5de62/attachment.htm>
More information about the asterisk-dev
mailing list