aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-06-30 14:17:55 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-12 23:42:47 +0200
commit1cbfef93515eefe6607556b930d558764e391bff (patch)
treebe652462036f988d72f69635608d50cc2c20e6bd /src
parentdba0700d1ec651d635afb46f3d09b15b6d66345a (diff)
osmo-bsc: only clear connections of a specific MSC
The BSC clears all connections on reception of a BSSAP RESET, however, the RESET command must not affect the connections of other MSCs. Ensure that only the connections of the MSC who actually sent the BSSAP RESET are cleared. Change-Id: I68fe2eadeae8ba6b6728fced42f6308e9b2d997a
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/osmo_bsc_sigtran.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 451329271..3ff26d0a2 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -373,10 +373,23 @@ void osmo_bsc_sigtran_reset(struct bsc_msc_data *msc)
/* Close all open connections */
llist_for_each_entry_safe(conn, conn_temp, &active_connections, entry) {
- if (conn->conn)
- gsm0808_clear(conn->conn);
- bsc_notify_msc_lost(conn);
- osmo_bsc_sigtran_del_conn(conn);
+
+ /* We only may close connections which actually belong to this
+ * MSC. All other open connections are left untouched */
+ if (conn->msc == msc) {
+ /* Notify active connection users via USSD that the MSC is down */
+ bsc_notify_msc_lost(conn);
+
+ /* Take down all occopied RF channels */
+ if (conn->conn)
+ gsm0808_clear(conn->conn);
+
+ /* Disconnect all Sigtran connections */
+ osmo_sccp_tx_disconn(msc->a.sccp_user, conn->conn_id, &msc->a.g_calling_addr, 0);
+
+ /* Delete subscriber connection */
+ osmo_bsc_sigtran_del_conn(conn);
+ }
}
}