提交 fd3b726e authored 作者: Mike Jerris's avatar Mike Jerris

FS-9970: [mod_sofia] don't detect nat in cases when the contact is in the acl,…

FS-9970: [mod_sofia] don't detect nat in cases when the contact is in the acl, but the packet actually came from a proxy.  We need to check where we got the packet from as being a natted address instead of the contact in order to properly handle nat to our next hop
上级 3fe59728
......@@ -9854,8 +9854,12 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
char *last_acl = NULL;
const char *contact_host = NULL;
if (sip && sip->sip_contact) {
contact_host = sip->sip_contact->m_url->url_host;
if (sip) {
if (sip->sip_via && sip->sip_via->v_host) {
contact_host = sip->sip_via->v_host;
} else if (sip->sip_contact) {
contact_host = sip->sip_contact->m_url->url_host;
}
}
if (!zstr(contact_host)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论