]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes issue with registrations not working properly with pedantic=yes.
authorDavid Vossel <dvossel@digium.com>
Mon, 20 Sep 2010 21:34:15 +0000 (21:34 +0000)
committerDavid Vossel <dvossel@digium.com>
Mon, 20 Sep 2010 21:34:15 +0000 (21:34 +0000)
(closes issue #18017)
Reported by: schmidts
Patches:
      issues_18017_v1.diff uploaded by dvossel (license 671)
Tested by: schmidts

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@287645 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index eb5ae4e1445b5be9da5590474051cb5db40a3f09..791babf9ac92b245abb0560feafe3b7181583338 100644 (file)
@@ -7236,8 +7236,10 @@ static enum match_req_res match_req_to_dialog(struct sip_pvt *sip_pvt_ptr, struc
                        return SIP_REQ_NOT_MATCH;
                }
        } else {
-               /* Verify the fromtag of Request matches the tag they provided earlier. */
-               if (strcmp(arg->fromtag, sip_pvt_ptr->theirtag)) {
+               /* Verify the fromtag of Request matches the tag they provided earlier.
+                * If this is a Request with authentication credentials, forget their old
+                * tag as it is not valid after the 401 or 407 response. */
+               if (!arg->authentication_present && strcmp(arg->fromtag, sip_pvt_ptr->theirtag)) {
                        /* their tag does not match the one was have stored for them */
                        return SIP_REQ_NOT_MATCH;
                }