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
This commit is contained in:
Harald Welte 2017-12-11 15:33:35 +01:00
parent f4b66fb2f1
commit d382bf63e2
3 changed files with 29 additions and 0 deletions

View File

@ -75,4 +75,7 @@ unsigned int paging_pending_requests_nr(struct gsm_bts *bts);
struct bsc_msc_data *paging_get_msc(struct gsm_bts *bts, struct bsc_subscr *bsub);
void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc);
void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc);
#endif

View File

@ -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);
}

View File

@ -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);