pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26893 )
Change subject: Fix DLCI CC bits transmitted in SAPI "n" REJECT
......................................................................
Fix DLCI CC bits transmitted in SAPI "n" REJECT
The SAPI "n" REJECT messages were being sent with DLCI keeping the RSL
LINK ID format, which is not the same for CC bits.
With this patch, TTCN3 test BSC_Tests.TC_rll_sapi_n_reject_dlci_cc
passes again.
Related: OS#4728
Related: SYS#5047
Change-Id: Icc187f594743040a3d9b8beff7d9cfc21dd6eb08
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/gsm_08_08.c
M src/osmo-bsc/osmo_bsc_bssap.c
4 files changed, 24 insertions(+), 23 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/26893/1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 4e26ec1..910c3d3 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -56,6 +56,26 @@
#define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
+/* Data Link Connection Identifier (DLCI) is defined in 3GPP TS 48.006, section 9.3.2.
+ * .... .SSS - SAPI value used on the radio link;
+ * CC.. .... - control channel identification:
+ * 00.. .... - indicates that the control channel is not further specified,
+ * 10.. .... - represents the FACCH or the SDCCH,
+ * 11.. .... - represents the SACCH,
+ * other values are reserved. */
+#define RSL_LINK_ID2DLCI(link_id) \
+ ((link_id & 0x40 ? 0xc0 : 0x80) | (link_id & 0x07))
+
+/* RSL Link Identifier is defined in 3GPP TS 3GPP TS 48.058, section 9.3.2.
+ * .... .SSS - SAPI value used on the radio link;
+ * ...P P... - priority for SAPI0 messages;
+ * CC.. .... - control channel identification:
+ * 00.. .... - main signalling channel (FACCH or SDCCH),
+ * 01.. .... - SACCH,
+ * other values are reserved. */
+#define DLCI2RSL_LINK_ID(dlci) \
+ ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07)
+
/* 3-bit long values */
#define EARFCN_PRIO_INVALID 8
#define EARFCN_MEAS_BW_INVALID 8
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index e33fe43..147e4b7 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -1147,16 +1147,16 @@
switch (rllr_ind) {
case BSC_RLLR_IND_EST_CONF:
- rsl_data_request(msg, OBSC_LINKID_CB(msg));
+ rsl_data_request(msg, link_id);
break;
case BSC_RLLR_IND_REL_IND:
- bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg),
+ bsc_sapi_n_reject(lchan->conn, RSL_LINK_ID2DLCI(link_id),
GSM0808_CAUSE_MS_NOT_EQUIPPED);
msgb_free(msg);
break;
case BSC_RLLR_IND_ERR_IND:
case BSC_RLLR_IND_TIMEOUT:
- bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg),
+ bsc_sapi_n_reject(lchan->conn, RSL_LINK_ID2DLCI(link_id),
GSM0808_CAUSE_BSS_NOT_EQUIPPED);
msgb_free(msg);
break;
@@ -1196,7 +1196,7 @@
rc = rll_establish(msg->lchan, sapi, rll_ind_cb, msg);
if (rc) {
msgb_free(msg);
- bsc_sapi_n_reject(conn, link_id, GSM0808_CAUSE_BSS_NOT_EQUIPPED);
+ bsc_sapi_n_reject(conn, RSL_LINK_ID2DLCI(link_id), GSM0808_CAUSE_BSS_NOT_EQUIPPED);
goto failed_to_send;
}
return;
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index 1715533..a99db43 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -536,15 +536,6 @@
return rc;
}
-/* Data Link Connection Identifier (DLCI) is defined in 3GPP TS 48.006, section 9.3.2.
- * .... .SSS - SAPI value used on the radio link;
- * CC.. .... - control channel identification:
- * 00.. .... - indicates that the control channel is not further specified,
- * 10.. .... - represents the FACCH or the SDCCH,
- * 11.. .... - represents the SACCH,
- * other values are reserved. */
-#define RSL_LINK_ID2DLCI(link_id) \
- (link_id & 0x40 ? 0xc0 : 0x80) | (link_id & 0x07)
/*! MS->BSC/MSC: Um L3 message. */
void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg)
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 904da62..3f56052 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -1208,16 +1208,6 @@
return ret;
}
-/* RSL Link Identifier is defined in 3GPP TS 3GPP TS 48.058, section 9.3.2.
- * .... .SSS - SAPI value used on the radio link;
- * ...P P... - priority for SAPI0 messages;
- * CC.. .... - control channel identification:
- * 00.. .... - main signalling channel (FACCH or SDCCH),
- * 01.. .... - SACCH,
- * other values are reserved. */
-#define DLCI2RSL_LINK_ID(dlci) \
- ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07)
-
static int dtap_rcvmsg(struct gsm_subscriber_connection *conn,
struct msgb *msg, unsigned int length)
{
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26893
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icc187f594743040a3d9b8beff7d9cfc21dd6eb08
Gerrit-Change-Number: 26893
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26615 )
Change subject: gscon clear: without SCCP conn, no need to wait for RLSD timeout
......................................................................
gscon clear: without SCCP conn, no need to wait for RLSD timeout
Skip the BSSMAP Clear and SCCP RLSD parts and immediately deallocate the
gscon when there is no SCCP connection present. Before this patch, such
conn would stick around for a minute before a timeout deallocates it.
Related: OS#5337
Change-Id: I8c8537acf6b47b121903197608636c43ae601a57
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 1b5f372..2183b18 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -210,6 +210,10 @@
gscon_release_lchans(conn, true, bsc_gsm48_rr_cause_from_gsm0808_cause(conn->clear_cause));
osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint);
+
+ /* If there is no SCCP connection at all, then no need to wait for an SCCP RLSD. */
+ if (!conn->sccp.msc || conn->sccp.state != SUBSCR_SCCP_ST_CONNECTED)
+ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL);
}
/* forward MO DTAP from RSL side to BSSAP side */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26615
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I8c8537acf6b47b121903197608636c43ae601a57
Gerrit-Change-Number: 26615
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged