laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
mgcp_network: do not try to convert RTCP packets

Make sure that RTCP packets do not enter the code path where AMR OA and BWE
is converted. The conversion will fail and the RTCP packet will be
dropped.

Change-Id: Ic850344d8b5f7710d12e4553a4033b733dced52b
Related: SYS#5902
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 0ea8c25..8ade27d 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1518,6 +1518,7 @@
return rc;
}

+/* Note: This function is able to handle RTP and RTCP */
static int rx_rtp(struct msgb *msg)
{
struct osmo_rtp_msg_ctx *mc = OSMO_RTP_MSG_CTX(msg);
@@ -1534,7 +1535,8 @@
* framing mode (octet-aligned vs. bandwith-efficient is explicitly
* define, then we check if the incoming payload matches that
* expectation. */
- if (amr_oa_bwe_convert_indicated(conn_src->end.codec)) {
+ if (mc->proto == MGCP_PROTO_RTP &&
+ amr_oa_bwe_convert_indicated(conn_src->end.codec)) {
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));
if (oa < 0)
return -1;

To view, visit change 27606. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ic850344d8b5f7710d12e4553a4033b733dced52b
Gerrit-Change-Number: 27606
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged