aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:53:22 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-11 18:53:22 +0000
commit90ed9369a06ce49e7e2a1adebe82b6c987d94692 (patch)
treeb9a3bb85c8bf4206656a409d86d2175a04a1b0b2 /channels
parent0a4fdd783232358927af0e8efb99823c29faca99 (diff)
Merged revisions 130170 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r130170 | tilghman | 2008-07-11 13:52:42 -0500 (Fri, 11 Jul 2008) | 15 lines Merged revisions 130169 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r130169 | tilghman | 2008-07-11 13:51:56 -0500 (Fri, 11 Jul 2008) | 7 lines 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) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@130171 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 7ce22973f..ea207dfea 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -8003,12 +8003,21 @@ static int socket_process(struct iax2_thread *thread)
* 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) ||