提交 79f8e133 authored 作者: Anthony Minessale's avatar Anthony Minessale

just in case make autoadj harder for spoofers

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1580 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b3e047f3
......@@ -787,8 +787,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if (rtp_session->recv_msg.header.version) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port &&
(rtp_session->from_addr->port != rtp_session->remote_port)) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port) {
if ((rtp_session->from_addr->port != rtp_session->remote_port)) {
const char *err;
char *tx_host;
uint32_t old = rtp_session->remote_port;
......@@ -801,6 +801,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
old_host, old, tx_host, rtp_session->from_addr->port);
switch_rtp_set_remote_address(rtp_session, tx_host, rtp_session->from_addr->port, &err);
}
switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
}
}
if (rtp_session->recv_msg.header.version == 2) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论