aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/a_iface.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-04-09 16:35:01 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-09 16:41:10 +0200
commit0e2fa5dcb55f77f282f926570b6da0459bd3971c (patch)
tree0dd5b0829ebae764cbbd96066d86be3df90eade6 /src/libmsc/a_iface.c
parent93c7463fcea24517ef367101609f34264570f1d0 (diff)
DTAP: Ensure proper DLCI is used in MSC-originated DTAP
The DLCI field of the DTAP header indicates the SAPI as well as the data link (main DCCH or SACCH). We must make sure to use the correct DLCI when sending DTAP to the BSC. We achieve this by * storing the DLCI in the msgb->cb while parsing the DTAP header * storing the received DLCI (from msgb->cb) in the transaction for mobile-originated transactions * using the trans->dlci to sent msgb->cb when transmitting L3 * filling the DTAP DLCI value from msgb->cb when transmitting DTAP For MSC-originated transactions, we choose a DLCI value corresponding to the service (SAPI=0 for CC, SAPI=3 for SMS) and store that in trans->dlci. Closes: OS#3150 Change-Id: If511b20f52575054cab1346d99a8cb68d827fdbf
Diffstat (limited to 'src/libmsc/a_iface.c')
-rw-r--r--src/libmsc/a_iface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index 2b1baf0fb..6f2000e00 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -145,14 +145,13 @@ int a_iface_tx_dtap(struct msgb *msg)
struct gsm_subscriber_connection *conn;
struct msgb *msg_resp;
- /* FIXME: Set this to some meaninful value! */
- uint8_t link_id = 0x00;
+ uint8_t link_id = OMSC_LINKID_CB(msg);
OSMO_ASSERT(msg);
conn = (struct gsm_subscriber_connection *)msg->dst;
OSMO_ASSERT(conn);
OSMO_ASSERT(conn->a.scu);
- LOGPCONN(conn, LOGL_DEBUG, "Passing DTAP message from MSC to BSC\n");
+ LOGPCONN(conn, LOGL_DEBUG, "Passing DTAP message (DLCI=0x%02x) from MSC to BSC\n", link_id);
msg->l3h = msg->data;
msg_resp = gsm0808_create_dtap(msg, link_id);