Changeset 4546


Ignore:
Timestamp:
Jun 27, 2013 10:07:14 AM (11 years ago)
Author:
bennylp
Message:

More re #1683:

  • also update the Via port when only the port has changed AND either the received IP is public OR allow_contact_rewrite is set to 2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r4545 r4546  
    14521452 
    14531453    /* If allow_via_rewrite is enabled, we save the Via "received" address 
    1454      * from the response. 
     1454     * from the response, if either of the following condition is met: 
     1455     *  - the Via "received" address differs from saved one (or we haven't 
     1456     *    saved any yet) 
     1457     *  - transport is different 
     1458     *  - only the port has changed, AND either the received address is 
     1459     *    public IP or allow_contact_rewrite is 2 
    14551460     */ 
    14561461    if (acc->cfg.allow_via_rewrite && 
    1457         (pj_strcmp(&acc->via_addr.host, via_addr) || acc->via_tp != tp)) 
     1462        (pj_strcmp(&acc->via_addr.host, via_addr) || acc->via_tp != tp || 
     1463         (acc->via_addr.port != rport && 
     1464           (!is_private_ip(via_addr) || acc->cfg.allow_contact_rewrite == 2)))) 
    14581465    { 
    14591466        if (pj_strcmp(&acc->via_addr.host, via_addr)) 
Note: See TracChangeset for help on using the changeset viewer.