[PATCH] libosmocore[master]: lapdm: Fix malformed Abis messages

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/.

Minh-Quang Nguyen gerrit-no-reply at lists.osmocom.org
Mon Jun 13 17:52:52 UTC 2016


Review at  https://gerrit.osmocom.org/266

lapdm: Fix malformed Abis messages

Change-Id: Idbf43d4fdda6b2a6b4d8d15826735ce5f260ad89
---
M src/gsm/lapdm.c
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/266/1

diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index fa7769b..0e877e1 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -421,6 +421,11 @@
 		rll_msg = RSL_MT_EST_IND;
 		break;
 	case OSMO_PRIM(PRIM_DL_EST, PRIM_OP_CONFIRM):
+		if (dp->oph.msg && dp->oph.msg->len == 0) {
+			/* omit L3 info by freeing message */
+			msgb_free(dp->oph.msg);
+			dp->oph.msg = NULL;
+		}
 		rll_msg = RSL_MT_EST_CONF;
 		break;
 	case OSMO_PRIM(PRIM_DL_DATA, PRIM_OP_INDICATION):
@@ -429,9 +434,19 @@
 	case OSMO_PRIM(PRIM_DL_UNIT_DATA, PRIM_OP_INDICATION):
 		return send_rslms_rll_l3_ui(mctx, dp->oph.msg);
 	case OSMO_PRIM(PRIM_DL_REL, PRIM_OP_INDICATION):
+		if (dp->oph.msg && dp->oph.msg->len == 0) {
+			/* omit L3 info by freeing message */
+			msgb_free(dp->oph.msg);
+			dp->oph.msg = NULL;
+		}
 		rll_msg = RSL_MT_REL_IND;
 		break;
 	case OSMO_PRIM(PRIM_DL_REL, PRIM_OP_CONFIRM):
+		if (dp->oph.msg && dp->oph.msg->len == 0) {
+			/* omit L3 info by freeing message */
+			msgb_free(dp->oph.msg);
+			dp->oph.msg = NULL;
+		}
 		rll_msg = RSL_MT_REL_CONF;
 		break;
 	case OSMO_PRIM(PRIM_DL_SUSP, PRIM_OP_CONFIRM):

-- 
To view, visit https://gerrit.osmocom.org/266
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbf43d4fdda6b2a6b4d8d15826735ce5f260ad89
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <minh-quang.nguyen at nutaq.com>



More information about the gerrit-log mailing list