aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-20 21:35:46 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-20 21:35:46 +0000
commitfdba848237e04506dcd8cd1e8ebb39bc6c3449a2 (patch)
tree6e5a4806ab0e5e79337200fc2f5955cb61187eee /channels/chan_sip.c
parent4cab609dbec4a54c3396301d8b559aaf71239f08 (diff)
Merged revisions 287645 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r287645 | dvossel | 2010-09-20 16:34:15 -0500 (Mon, 20 Sep 2010) | 9 lines Fixes issue with registrations not working properly with pedantic=yes. (closes issue #18017) Reported by: schmidts Patches: issues_18017_v1.diff uploaded by dvossel (license 671) Tested by: schmidts ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@287646 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cf9f41b8a..6b4e281c9 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7260,8 +7260,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;
}