Ignore:
Timestamp:
Feb 27, 2013 2:18:20 PM (12 years ago)
Author:
riza
Message:

Re #1607: backported to 1.x

Location:
pjproject/branches/1.x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x

  • pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_acc.c

    r4127 r4398  
    16681668        acc->ka_transport = param->rdata->tp_info.transport; 
    16691669        pjsip_transport_add_ref(acc->ka_transport); 
    1670         pj_memcpy(&acc->ka_target, &param->rdata->pkt_info.src_addr, 
    1671                   param->rdata->pkt_info.src_addr_len); 
    1672         acc->ka_target_len = param->rdata->pkt_info.src_addr_len; 
     1670 
     1671        /* https://trac.pjsip.org/repos/ticket/1607: 
     1672         * Calculate the destination address from the original request. Some 
     1673         * (broken) servers send the response using different source address 
     1674         * than the one that receives the request, which is forbidden by RFC 
     1675         * 3581. 
     1676         */ 
     1677        { 
     1678            pjsip_transaction *tsx; 
     1679            pjsip_tx_data *req; 
     1680 
     1681            tsx = pjsip_rdata_get_tsx(param->rdata); 
     1682            PJ_ASSERT_ON_FAIL(tsx, return); 
     1683 
     1684            req = tsx->last_tx; 
     1685 
     1686            pj_memcpy(&acc->ka_target, &req->tp_info.dst_addr, 
     1687                      req->tp_info.dst_addr_len); 
     1688            acc->ka_target_len = req->tp_info.dst_addr_len; 
     1689        } 
    16731690 
    16741691        /* Setup and start the timer */ 
Note: See TracChangeset for help on using the changeset viewer.