diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-07-19 15:53:50 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-07-19 15:53:50 +0000 |
commit | 7b09e738f0c479d5ee2d6e780e4c7bde12047004 (patch) | |
tree | 8398f1329a944d36af6c8fa1789bd8d2f713c40e /channels | |
parent | f3b1eab2f38a1f4b1dca1913eca82121ed1d7946 (diff) |
Merged revisions 75928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r75928 | russell | 2007-07-19 10:53:15 -0500 (Thu, 19 Jul 2007) | 14 lines
Merged revisions 75927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines
When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index f9cd417dd..23ef72958 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -7144,7 +7144,9 @@ static int socket_process(struct iax2_thread *thread) /* If it's not an ACK packet, it's out of order. */ ast_debug(1, "Packet arrived out of order (expecting %d, got %d) (frametype = %d, subclass = %d)\n", iaxs[fr->callno]->iseqno, fr->oseqno, f.frametype, f.subclass); - if (iaxs[fr->callno]->iseqno > fr->oseqno) { + /* Check to see if we need to request retransmission, + * and take sequence number wraparound into account */ + if ((unsigned char) (iaxs[fr->callno]->iseqno - fr->oseqno) < 128) { /* If we've already seen it, ack it XXX There's a border condition here XXX */ if ((f.frametype != AST_FRAME_IAX) || ((f.subclass != IAX_COMMAND_ACK) && (f.subclass != IAX_COMMAND_INVAL))) { |