[asterisk-commits] res rtp asterisk: Count a roll-over of the sequence number e... (asterisk[11])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 20 10:29:22 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets.
......................................................................
res_rtp_asterisk: Count a roll-over of the sequence number even on lost packets.
With this change, the initial RTP sequence number is randomly chosen not between
0 and 65535 (0xffff) but 0 and 32767 (0x7fff). This assures, the roll-over
counter (ROC) synchronization is not lost for sRTP, when the very first RTP
packets get lost; see http://srtp.sourceforge.net/faq.html#Q6
ASTERISK-26207 #close
Change-Id: I9a527e3aa3ce8f3becc5131d7ba32b57b5845464
---
M res/res_rtp_asterisk.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index d60440e..3223cc9 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2536,7 +2536,7 @@
/* Set default parameters on the newly created RTP structure */
rtp->ssrc = ast_random();
- rtp->seqno = ast_random() & 0xffff;
+ rtp->seqno = ast_random() & 0x7fff;
rtp->strict_rtp_state = (strictrtp ? STRICT_RTP_LEARN : STRICT_RTP_OPEN);
if (strictrtp) {
rtp_learning_seq_init(&rtp->rtp_source_learn, (uint16_t)rtp->seqno);
--
To view, visit https://gerrit.asterisk.org/3222
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9a527e3aa3ce8f3becc5131d7ba32b57b5845464
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-commits
mailing list