aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-01-25 18:53:22 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:09 +0100
commit9dcae17866e40814bf0cc4b70ec6f3453814b4f7 (patch)
treebeb1b1870ed40e6c01396b131108a33517583715 /openbsc/src/gprs
parentc2c5176328e211007c6e4b41c4c583788bb70a1f (diff)
wip
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/iu.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/gprs/iu.c b/openbsc/src/gprs/iu.c
index 30c5a9c6d..43056bbc3 100644
--- a/openbsc/src/gprs/iu.c
+++ b/openbsc/src/gprs/iu.c
@@ -481,7 +481,7 @@ static struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_networ
return NULL;
}
-/* Receive MM/CC message from Iu-CS (SCCP user SAP).
+/* Receive MM/CC/... message from Iu-CS (SCCP user SAP).
* msg->dst must reference a struct ue_conn_ctx. link_id identifies the SCTP
* peer that sent the msg.
*
@@ -502,6 +502,14 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t l
if (conn) {
/* if we already have a connection, handle DTAP.
gsm0408_dispatch() is aka msc_dtap() */
+
+ /* Make sure we don't receive RR over Iu-CS; otherwise all
+ * messages handled by gsm0408_dispatch() are of interest (CC,
+ * MM, SMS, NS_SS, maybe even MM_GPRS and SM_GPRS). */
+ struct gsm48_hdr *gh = msgb_l3(msg);
+ uint8_t pdisc = gh->proto_discr & 0x0f;
+ OSMO_ASSERT(pdisc != GSM48_PDISC_RR);
+
gsm0408_dispatch(conn, msg);
} else {
/* allocate a new connection */