Changeset 5469


Ignore:
Timestamp:
Oct 24, 2016 7:20:36 AM (8 years ago)
Author:
nanang
Message:

Re #1971: Updated TURN session to add REQUEST-ADDRESS-FAMILY/REQ-ADDR-TYPE attribute in Allocate of IPv6 relay request.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/turn_session.c

    r5380 r5469  
    771771    } 
    772772 
     773    /* Include ADDRESS-FAMILY for IPv6 request */ 
     774    if (sess->af == pj_AF_INET6()) { 
     775        enum { IPV6_AF_TYPE = 0x02 << 24 }; 
     776        pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
     777                                  PJ_STUN_ATTR_REQ_ADDR_TYPE, IPV6_AF_TYPE); 
     778    } 
     779 
    773780    /* Server address must be set */ 
    774781    pj_assert(sess->srv_addr != NULL); 
     
    13541361    if (raddr_attr && raddr_attr->sockaddr.addr.sa_family != sess->af) { 
    13551362        on_session_fail(sess, method, PJNATH_EINSTUNMSG, 
    1356                         pj_cstr(&s, "Error: RELAY-ADDRESS with non IPv4" 
    1357                                     " address family is not supported " 
    1358                                     "for now")); 
     1363                        pj_cstr(&s, "Error: Mismatched RELAY-ADDRESS " 
     1364                                    "address family")); 
    13591365        return; 
    13601366    } 
Note: See TracChangeset for help on using the changeset viewer.