diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-02-26 21:22:35 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-02-26 21:22:35 +0000 |
commit | 3105a43d2c2e4f84e56f7623ad9178ccb4c239e1 (patch) | |
tree | b49a2a9db57392708f73863dbac79077f8e257cd /pjsip | |
parent | 24609fbd4bdb691f1c272c1782a1c90d7b8f24f1 (diff) |
Do not drop response with mismatch sent-by, since it can happen when endpoint in private network sends request to public server (e.g. SER)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@235 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsip/sip_endpoint.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pjsip/src/pjsip/sip_endpoint.c b/pjsip/src/pjsip/sip_endpoint.c index 46341929..321dbb82 100644 --- a/pjsip/src/pjsip/sip_endpoint.c +++ b/pjsip/src/pjsip/sip_endpoint.c @@ -674,9 +674,19 @@ static void endpt_on_rx_msg( pjsip_endpoint *endpt, port = pjsip_transport_get_default_port_for_type(type); } local_addr = &rdata->tp_info.transport->local_name.host; - if (pj_strcmp(&rdata->msg_info.via->sent_by.host, local_addr) != 0) + + if (pj_strcmp(&rdata->msg_info.via->sent_by.host, local_addr) != 0) { + + /* The RFC says that we should drop response when sent-by + * address mismatch. But it could happen (e.g. with SER) when + * endpoint with private IP is sending request to public + * server. + mismatch = PJ_TRUE; - else if (port != rdata->tp_info.transport->local_name.port) { + + */ + + } else if (port != rdata->tp_info.transport->local_name.port) { /* Port or address mismatch, we should discard response */ /* But we saw one implementation (we don't want to name it to * protect the innocence) which put wrong sent-by port although |