[Pkg-voip-commits] [asterisk] 01/10: Add AST-2017-012.patch

tzafrir at debian.org tzafrir at debian.org
Wed Dec 13 20:23:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch stretch
in repository asterisk.

commit 8c7d8dd5bcdad985829bf294638925a4b735c3ac
Author: Tzafrir Cohen <tzafrir at debian.org>
Date:   Wed Dec 13 17:31:53 2017 +0200

    Add AST-2017-012.patch
---
 debian/patches/AST-2017-012.patch | 59 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 2 files changed, 60 insertions(+)

diff --git a/debian/patches/AST-2017-012.patch b/debian/patches/AST-2017-012.patch
new file mode 100644
index 0000000..c163787
--- /dev/null
+++ b/debian/patches/AST-2017-012.patch
@@ -0,0 +1,59 @@
+From 5705e8ae0e05602d5399faa561c3119cfb83eca3 Mon Sep 17 00:00:00 2001
+From: Joshua Colp <jcolp at digium.com>
+Date: Thu, 30 Nov 2017 16:12:55 +0000
+Subject: [PATCH] AST-2017-012: Place single RTCP report block at beginning of
+ report.
+
+When the RTCP code was transitioned over to Stasis a code change
+was made to keep track of how many reports are present. This count
+controlled where report blocks were placed in the RTCP report.
+
+If a compound RTCP packet was received this logic would incorrectly
+place a report block in the wrong location resulting in a write
+to an invalid location.
+
+This change removes this counting logic and always places the report
+block at the first position. If in the future multiple reports are
+supported the logic can be extended but for now keeping a count
+serves no purpose.
+
+ASTERISK-27382
+ASTERISK-27429
+
+Change-Id: Iad6c8a9985c4b608ef493e19c421211615485116
+---
+ res/res_rtp_asterisk.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
+index c921f36b31..cf793a663f 100644
+--- a/res/res_rtp_asterisk.c
++++ b/res/res_rtp_asterisk.c
+@@ -4742,7 +4742,6 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
+ 	unsigned int first_word;
+ 	/*! True if we have seen an acceptable SSRC to learn the remote RTCP address */
+ 	unsigned int ssrc_seen;
+-	int report_counter = 0;
+ 	struct ast_rtp_rtcp_report_block *report_block;
+ 	struct ast_frame *f = &ast_null_frame;
+ 
+@@ -4956,7 +4955,7 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
+ 				if (!report_block) {
+ 					return &ast_null_frame;
+ 				}
+-				rtcp_report->report_block[report_counter] = report_block;
++				rtcp_report->report_block[0] = report_block;
+ 				report_block->source_ssrc = ntohl(rtcpheader[i]);
+ 				report_block->lost_count.packets = ntohl(rtcpheader[i + 1]) & 0x00ffffff;
+ 				report_block->lost_count.fraction = ((ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24);
+@@ -4993,7 +4992,6 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
+ 					ast_verbose("  DLSR: %4.4f (sec)\n",(double)report_block->dlsr / 65536.0);
+ 					ast_verbose("  RTT: %4.4f(sec)\n", rtp->rtcp->rtt);
+ 				}
+-				report_counter++;
+ 			}
+ 			/* If and when we handle more than one report block, this should occur outside
+ 			 * this loop.
+-- 
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 9e7445d..0739d0d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -50,3 +50,4 @@ AST-2017-004.patch
 AST-2017-005-13.13.diff
 AST-2017-006-13.diff
 AST-2017-008-13.13.diff
+AST-2017-012.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list