[OpenSIPS-Devel] [ opensips-Bugs-3231716 ] retransmitted INVITE with auth is wrongly challenged

SourceForge.net noreply at sourceforge.net
Mon Mar 21 12:11:28 CET 2011


Bugs item #3231716, was opened at 2011-03-21 12:11
Message generated for change (Tracker Item Submitted) made by neutrino38
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3231716&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.6.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Emmanuel BUU (neutrino38)
Assigned to: Nobody/Anonymous (nobody)
Summary: retransmitted INVITE with auth is wrongly challenged

Initial Comment:
Hello,

I have the following call case with transmission

UA                                  OpenSIPs

INVITE (cseq=1) -----------> 
NVITE (cseq=1)  ----------->

<--------------------------- 407 (cseq=1)
ACK (cseq=1) ----------------------->

INVITE (cseq=2, auth) ------------->
<--------------------------- 407 (cseq=1)
ACK (cseq=1) ----------------------->

INVITE (cseq=2, auth) ------------->
<--------------------------- 407 (cseq=2)
ACK (cseq=2) ----------------------->

<-------------------------- 180 Ringing


So basically, the invite with cseq=2 is sent twice and the first time, it seems to be re-challenged again although the creds seems to be correcte.
The SECOND attempt is processed correctly. Of course, the UA is considering the call as failed because it received a 407 on its second invite.

Digging in ze code, I founf the following in auth_mod.c 
 
static inline int pv_authorize(struct sip_msg* msg, gparam_p realm,
                                                                                hdr_types_t hftype)
{
        static char ha1[256];
        int res;
        struct hdr_field* h;
        auth_body_t* cred;
        auth_result_t ret;
        str domain;

        if(fixup_get_svalue(msg, realm, &domain)!=0)
        {
                LM_ERR("invalid realm parameter\n");
                return -1;
        }

Why the ha1 variable  need to be STATIC ? It thpught that the auth processing of OpenSIPS was to be stateless?

Emmanuel BUU
http://www.ives.fr



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3231716&group_id=232389



More information about the Devel mailing list