[asterisk-commits] bridge native rtp.c: Fix direct media video RTP instance ACL... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 10 10:53:12 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5967 )

Change subject: bridge_native_rtp.c: Fix direct media video RTP instance ACL check.
......................................................................

bridge_native_rtp.c: Fix direct media video RTP instance ACL check.

The video stream was using the audio stream RTP instance addresses to
check if the video RTP gets directed to an allowed direct media Access
Control List (ACL) address.  There is no guarantee that the video RTP
instance uses the same addresses as the audio RTP instance.

This looks like it has been a bug since v11 when direct media ACL was
first added to chan_sip and then faithfully reproduced through a couple
code refactorings into the new bridging architecture.

Change-Id: I8ddd56320e0eea769f3ceed3fa5b6bdfb51d681a
---
M bridges/bridge_native_rtp.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c
index a459c9c..02b27e1 100644
--- a/bridges/bridge_native_rtp.c
+++ b/bridges/bridge_native_rtp.c
@@ -182,10 +182,10 @@
 		}
 	}
 	if (glue0->video.result == glue1->video.result && glue1->video.result == AST_RTP_GLUE_RESULT_REMOTE) {
-		if (glue0->cb->allow_vrtp_remote && !glue0->cb->allow_vrtp_remote(c0, glue1->audio.instance)) {
-			/* if the allow_vrtp_remote indicates that remote isn't allowed, revert to local bridge */
+		if (glue0->cb->allow_vrtp_remote && !glue0->cb->allow_vrtp_remote(c0, glue1->video.instance)) {
+			/* If the allow_vrtp_remote indicates that remote isn't allowed, revert to local bridge */
 			glue0->video.result = glue1->video.result = AST_RTP_GLUE_RESULT_LOCAL;
-		} else if (glue1->cb->allow_vrtp_remote && !glue1->cb->allow_vrtp_remote(c1, glue0->audio.instance)) {
+		} else if (glue1->cb->allow_vrtp_remote && !glue1->cb->allow_vrtp_remote(c1, glue0->video.instance)) {
 			glue0->video.result = glue1->video.result = AST_RTP_GLUE_RESULT_LOCAL;
 		}
 	}

-- 
To view, visit https://gerrit.asterisk.org/5967
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ddd56320e0eea769f3ceed3fa5b6bdfb51d681a
Gerrit-Change-Number: 5967
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170710/9d2205bd/attachment-0001.html>


More information about the asterisk-commits mailing list