Ignore:
Timestamp:
Oct 7, 2009 8:42:28 AM (15 years ago)
Author:
bennylp
Message:

More #962: STUN compatibility problem with RFC 3489 servers (in encoding SERVER-NAME or SOFTWARE attribute):

Location:
pjproject/branches/adhocs/1.4.5
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/adhocs/1.4.5

  • pjproject/branches/adhocs/1.4.5/pjnath/src/pjnath-test/stun.c

    r2775 r2929  
    480480        "", 
    481481        &create_msgint1 
    482     }, 
     482    } 
     483    /* disabled: see http://trac.pjsip.org/repos/ticket/960 
     484    , 
    483485    { 
    484486        PJ_STUN_BINDING_RESPONSE, 
     
    504506        &create_msgint2 
    505507    } 
     508    */ 
     509 
     510    /* disabled: see http://trac.pjsip.org/repos/ticket/960 
    506511#if defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0 
    507512    , 
     
    543548    } 
    544549#endif 
     550    */ 
    545551}; 
    546552 
  • pjproject/branches/adhocs/1.4.5/pjnath/src/pjnath/stun_msg.c

    r2922 r2929  
    12361236    PUTVAL16H(buf, 0, ca->hdr.type); 
    12371237 
    1238     /* Set the length to be 4-bytes aligned so that we can 
    1239      * communicate with RFC 3489 endpoints 
     1238    /* Special treatment for SOFTWARE attribute: 
     1239     * This attribute had caused interop problem when talking to  
     1240     * legacy RFC 3489 STUN servers, due to different "length" 
     1241     * rules with RFC 5389. 
    12401242     */ 
    1241     PUTVAL16H(buf, 2, (pj_uint16_t)((ca->value.slen + 3) & (~3))); 
     1243    if (msghdr->magic != PJ_STUN_MAGIC || 
     1244        ca->hdr.type == PJ_STUN_ATTR_SOFTWARE) 
     1245    { 
     1246        /* Set the length to be 4-bytes aligned so that we can 
     1247         * communicate with RFC 3489 endpoints 
     1248         */ 
     1249        PUTVAL16H(buf, 2, (pj_uint16_t)((ca->value.slen + 3) & (~3))); 
     1250    } else { 
     1251        /* Use RFC 5389 rule */ 
     1252        PUTVAL16H(buf, 2, (pj_uint16_t)ca->value.slen); 
     1253    } 
    12421254 
    12431255    /* Copy the string */ 
  • pjproject/branches/adhocs/1.4.5/third_party/build/g7221/output

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.