aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-12-11 15:33:35 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-11 16:21:38 +0100
commitd382bf63e2b7e28fe41c5310c26fe584f0356897 (patch)
treeb6325cb0a97828ac8060001b9ae2282c777fde29 /src
parentf4b66fb2f13b22797d547cc4ce3650a25f3ee3e4 (diff)
paging: Stop all paging if MSC sends us BSSMAP RESET
When the MSC has lost its state and issues a RESET, we should not only clear all ongoing radio connections, but we should also stop any paging. There's no point in paging a subscriber if the MSC doesn't know about this paging anymore. Change-Id: If3f53d3bb66ad2dc02db823cb813590c6b59c700 Closes: OS#2736
Diffstat (limited to 'src')
-rw-r--r--src/libbsc/paging.c23
-rw-r--r--src/osmo-bsc/osmo_bsc_bssap.c3
2 files changed, 26 insertions, 0 deletions
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index f4679de5a..8d54d0a5e 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -467,3 +467,26 @@ struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub
return NULL;
}
+
+/*! Flush all paging requests at a given BTS for a given MSC*/
+void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc)
+{
+ struct gsm_paging_request *req, *req2;
+
+ llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) {
+ if (msc && req->msc != msc)
+ continue;
+ /* now give up the data structure */
+ LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d (flush).\n", req->bsub->imsi, bts->nr);
+ paging_remove_request(&bts->paging, req);
+ }
+}
+
+/*! Flush all paging requests issued by \a msc on any BTS in \a net */
+void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc)
+{
+ struct gsm_bts *bts;
+
+ llist_for_each_entry(bts, &net->bts_list, list)
+ paging_flush_bts(bts, msc);
+}
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 73776adde..051b74e60 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -218,6 +218,9 @@ static int bssmap_handle_reset(struct bsc_msc_data *msc,
* close all active channels on the BTS side as well */
osmo_bsc_sigtran_reset(msc);
+ /* Drop all ongoing paging requests that this MSC has created on any BTS */
+ paging_flush_network(msc->network, msc);
+
/* Inform the MSC that we have received the reset request and
* that we acted accordingly */
osmo_bsc_sigtran_tx_reset_ack(msc);