Ignore:
Timestamp:
Aug 2, 2017 2:51:59 AM (7 years ago)
Author:
ming
Message:

Fixed #2032: NAT64 support for IPv4 interoperability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c

    r5519 r5636  
    701701    pj_pool_t *pool; 
    702702    struct udp_transport *tp; 
    703     const char *format, *ipv6_quoteb, *ipv6_quotee; 
     703    const char *format, *ipv6_quoteb = "", *ipv6_quotee = ""; 
    704704    unsigned i; 
    705705    pj_status_t status; 
     
    710710    /* Object name. */ 
    711711    if (type & PJSIP_TRANSPORT_IPV6) { 
     712        pj_in6_addr dummy6; 
     713 
    712714        format = "udpv6%p"; 
    713         ipv6_quoteb = "["; 
    714         ipv6_quotee = "]"; 
     715        /* We don't need to add quote if the transport type is IPv6, but 
     716         * actually translated to IPv4. 
     717         */ 
     718        if (pj_inet_pton(pj_AF_INET6(), &a_name->host, &dummy6)==PJ_SUCCESS) { 
     719            ipv6_quoteb = "["; 
     720            ipv6_quotee = "]"; 
     721        } 
    715722    } else { 
    716723        format = "udp%p"; 
    717         ipv6_quoteb = ipv6_quotee = ""; 
    718724    } 
    719725 
Note: See TracChangeset for help on using the changeset viewer.