diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-06-30 14:17:55 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2017-06-30 14:17:55 +0200 |
commit | 9360d613f4e878caf469e9049262e8f1a567e92f (patch) | |
tree | b883191aecefd440f07927605b84ab2b8e577547 | |
parent | e80608d9fdacc6411d31def68dd00285642eecbd (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.
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_sigtran.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sigtran.c b/openbsc/src/osmo-bsc/osmo_bsc_sigtran.c index 451329271..3ff26d0a2 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/openbsc/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); + } } } |