Change in osmo-bsc[master]: gsm_08_08: abort complete L3 3 msg gen when no codecs are set

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Oct 6 10:20:13 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11236 )

Change subject: gsm_08_08: abort complete L3 3 msg gen when no codecs are set
......................................................................

gsm_08_08: abort complete L3 3 msg gen when no codecs are set

The COMPLETE LAYER 3 INFORMATION message should contain a Codec List
(BSS Supported) IE. The contents of this list depend on the BTS
capabilities and of the MSC configuration (allowed codecs). There may
be cases where (due to miss-configuration) the list is empty. In those
cases the BSC hits an assertion because the encoding of the overall
message fails when the codec list is empty. A check is needed.

- Check codec list before message generation, abort if the coded
  list is empty.

Change-Id: I119607047a132b75b3077bbe56c97936d8ae6c96
Related: OS#3625
---
M src/osmo-bsc/gsm_08_08.c
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 807eb8c..6e1e502 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -495,7 +495,12 @@
 
 	if (gscon_is_aoip(conn)) {
 		gen_bss_supported_codec_list(&scl, msc, conn_get_bts(conn));
-		resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), &scl);
+		if (scl.len > 0)
+			resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), &scl);
+		else {
+			LOGP(DMSC, LOGL_ERROR, "Failed to create layer3 message due to empty speech codec list.\n");
+			return false;
+		}
 	} else
 		resp = gsm0808_create_layer3_2(msg, cgi_for_msc(conn->sccp.msc, conn_get_bts(conn)), NULL);
 

-- 
To view, visit https://gerrit.osmocom.org/11236
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I119607047a132b75b3077bbe56c97936d8ae6c96
Gerrit-Change-Number: 11236
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181006/252ee48b/attachment.htm>


More information about the gerrit-log mailing list