[asterisk-commits] kharwell: branch certified-13.1 r431200 - in /certified/branches/13.1: ./ cha...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 27 13:25:18 CST 2015
Author: kharwell
Date: Tue Jan 27 13:25:15 2015
New Revision: 431200
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431200
Log:
chan_sip: stale nonce causes failure
When refreshing (with a small expiration) a registration that was sent to
chan_sip the nonce would be considered stale and reject the registration.
What was happening was that the initial registration's "dialog" still existed
in the dialogs container and upon refresh the dialog match algorithm would
choose that as the "dialog" instead of the newly created one. This occurred
because the algorithm did not check to see if the from tag matched if
authentication info was available after the 401. So, it ended up assuming
the original "dialog" was a match and stopped the search. The old "dialog"
of course had an old nonce, thus the stale nonce message.
This fix attempts to leave the original functionality alone except in the case
of a REGISTER. If a REGISTER is received if searches for an existing "dialog"
matching only on the callid. If the expires value is low enough it will reuse
dialog that is there, otherwise it will create a new one.
ASTERISK-24715 #close
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/4367/
........
Merged revisions 431187 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 431194 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
certified/branches/13.1/ (props changed)
certified/branches/13.1/channels/chan_sip.c
Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: certified/branches/13.1/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/channels/chan_sip.c?view=diff&rev=431200&r1=431199&r2=431200
==============================================================================
--- certified/branches/13.1/channels/chan_sip.c (original)
+++ certified/branches/13.1/channels/chan_sip.c Tue Jan 27 13:25:15 2015
@@ -9225,7 +9225,8 @@
}
}
- if (!sip_cfg.pedanticsipchecking) {
+ /* match on callid only for REGISTERs */
+ if (!sip_cfg.pedanticsipchecking || req->method == SIP_REGISTER) {
struct sip_pvt tmp_dialog = {
.callid = callid,
};
More information about the asterisk-commits
mailing list