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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/14552
Change subject: libmsc/ran_msg_iu.c: fix: properly handle SAPI IE of RANAP_DirectTransfer
......................................................................
libmsc/ran_msg_iu.c: fix: properly handle SAPI IE of RANAP_DirectTransfer
The RANAP DirectTransfer message may contain an optional SAPI IE.
Thanks to our TTCN-3 tests (and Wireshark!), it was discovered
that this IE is ignored, so even if the MO SMS related messages
arrive on SAPI 3 (as per GSM TS 04.11, section 2.3) OsmoMSC sends
MT messages on SAPI 0.
In ran_iu_decode_l3() we need to check if the SAPI IE is present,
and tag the NAS PDU message buffer with a proper DLCI value.
This change makes the failing SMS related test cases pass.
Change-Id: I728b55b04e87fc23be6d4f8735e8cad82b6f640e
---
M src/libmsc/ran_msg_iu.c
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/52/14552/1
diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c
index f443944..d5b9143 100644
--- a/src/libmsc/ran_msg_iu.c
+++ b/src/libmsc/ran_msg_iu.c
@@ -37,6 +37,7 @@
#include <osmocom/msc/msc_common.h>
#include <osmocom/msc/sccp_ran.h>
#include <osmocom/msc/ran_msg_iu.h>
+#include <osmocom/msc/gsm_04_11.h>
/* Implement the extern talloc_asn1_ctx from libasn1c as talloc ctx for ASN.1 message composition */
void *talloc_asn1_ctx = NULL;
@@ -92,8 +93,11 @@
msgb_free(ran);
}
-static void ran_iu_decode_l3(struct ran_dec *ran_iu_decode, const RANAP_NAS_PDU_t *nas_pdu, const char *msg_name)
+static void ran_iu_decode_l3(struct ran_dec *ran_iu_decode,
+ const RANAP_DirectTransferIEs_t *ies,
+ const char *msg_name)
{
+ const RANAP_NAS_PDU_t *nas_pdu = &ies->nas_pdu;
struct msgb *ran = msgb_alloc(256, msg_name);
struct ran_msg ran_dec_msg;
@@ -101,6 +105,12 @@
ran->l3h = msgb_put(ran, nas_pdu->size);
memcpy(ran->l3h, nas_pdu->buf, nas_pdu->size);
+ /* Handle optional SAPI IE */
+ if (ies->presenceMask & DIRECTTRANSFERIES_RANAP_SAPI_PRESENT) {
+ if (ies->sapi == RANAP_SAPI_sapi_3)
+ OMSC_LINKID_CB(ran) = UM_SAPI_SMS;
+ }
+
ran_dec_msg = (struct ran_msg){
.msg_type = RAN_MSG_DTAP,
.msg_name = msg_name,
@@ -266,7 +276,7 @@
return;
case RANAP_ProcedureCode_id_DirectTransfer:
- ran_iu_decode_l3(ran_iu_decode, &message->msg.directTransferIEs.nas_pdu, "RANAP DirectTransfer RAN PDU");
+ ran_iu_decode_l3(ran_iu_decode, &message->msg.directTransferIEs, "RANAP DirectTransfer RAN PDU");
return;
case RANAP_ProcedureCode_id_SecurityModeControl:
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/14552
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I728b55b04e87fc23be6d4f8735e8cad82b6f640e
Gerrit-Change-Number: 14552
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190619/ac66570f/attachment.htm>