Ignore:
Timestamp:
May 23, 2007 7:05:59 AM (17 years ago)
Author:
bennylp
Message:

Ticket #287: selectively disable authentication for several STUN error responses

File:
1 edited

Legend:

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

    r1284 r1290  
    268268    } 
    269269 
    270     need_auth = PJ_STUN_IS_REQUEST(msg->hdr.type) || 
    271                 PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type); 
     270    need_auth = pj_stun_auth_valid_for_msg(msg); 
    272271 
    273272    if (sess->cred && sess->cred->type == PJ_STUN_AUTH_CRED_STATIC && 
     
    844843     * is specified in the option. 
    845844     */ 
    846     if ((options & PJ_STUN_NO_AUTHENTICATE) == 0 && tdata->auth_key.slen != 0) 
     845    if ((options & PJ_STUN_NO_AUTHENTICATE) == 0 && tdata->auth_key.slen != 0 
     846        && pj_stun_auth_valid_for_msg(msg)) 
    847847    { 
    848848        status = pj_stun_authenticate_response(pkt, pkt_len, msg,  
Note: See TracChangeset for help on using the changeset viewer.