[asterisk-commits] tilghman: branch 1.4 r130169 - /branches/1.4/channels/chan_iax2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 11 13:51:56 CDT 2008
Author: tilghman
Date: Fri Jul 11 13:51:56 2008
New Revision: 130169
URL: http://svn.digium.com/view/asterisk?view=rev&rev=130169
Log:
Ensure that a destination callno of 0 will not match for frames that do not
start a dialog (new, lagrq, and ping).
(closes issue #12963)
Reported by: russellb
Patches:
chan_iax2_dup_new_fix4.patch uploaded by jpgrayson (license 492)
Modified:
branches/1.4/channels/chan_iax2.c
Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=130169&r1=130168&r2=130169
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Fri Jul 11 13:51:56 2008
@@ -7191,12 +7191,21 @@
* Discussed in the following thread:
* http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html
*/
- if (f.frametype != AST_FRAME_IAX ||
- (f.subclass != IAX_COMMAND_NEW &&
- f.subclass != IAX_COMMAND_PING &&
- f.subclass != IAX_COMMAND_LAGRQ)) {
- /* Get the destination call number */
- dcallno = ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS;
+
+ /* Get the destination call number */
+ dcallno = ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS;
+
+ if (f.frametype == AST_FRAME_IAX &&
+ (f.subclass == IAX_COMMAND_NEW ||
+ f.subclass == IAX_COMMAND_PING ||
+ f.subclass == IAX_COMMAND_LAGRQ)) {
+ dcallno = 0;
+ } else if (!dcallno) {
+ /* All other full-frames must have a non-zero dcallno,
+ * We silently drop this frame since it cannot be a
+ * valid match to an existing call session.
+ */
+ return 1;
}
if ((f.frametype == AST_FRAME_IAX) && ((f.subclass == IAX_COMMAND_NEW) || (f.subclass == IAX_COMMAND_REGREQ) ||
(f.subclass == IAX_COMMAND_POKE) || (f.subclass == IAX_COMMAND_FWDOWNL) ||
More information about the asterisk-commits
mailing list