This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/6880
paging: Drop + Log paging requests for non-existant paging groups
Change-Id: Id02c8fea51c1260f1baae8566c67bafc5bdb970e
Related: OS#2992
---
M src/common/paging.c
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/80/6880/1
diff --git a/src/common/paging.c b/src/common/paging.c
index d796176..c5c23d7 100644
--- a/src/common/paging.c
+++ b/src/common/paging.c
@@ -35,6 +35,7 @@
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/gsm0502.h>
+#include <osmocom/gsm/gsm48.h>
#include <osmo-bts/bts.h>
#include <osmo-bts/rsl.h>
@@ -177,10 +178,18 @@
const uint8_t *identity_lv, uint8_t chan_needed)
{
struct llist_head *group_q = &ps->paging_queue[paging_group];
+ int blocks = gsm48_number_of_paging_subchannels(&ps->chan_desc);
struct paging_record *pr;
rate_ctr_inc2(ps->btsb->bts->ctrs, BTS_CTR_PAGING_RCVD);
+ if (paging_group >= blocks) {
+ LOGP(DPAG, LOGL_ERROR, "BSC Send PAGING for group %u, but number of paging "
+ "sub-channels is only %u\n", paging_group, blocks);
+ rate_ctr_inc2(ps->btsb->bts->ctrs, BTS_CTR_PAGING_DROP);
+ return -EINVAL;
+ }
+
if (ps->num_paging >= ps->num_paging_max) {
LOGP(DPAG, LOGL_NOTICE, "Dropping paging, queue full (%u)\n",
ps->num_paging);
--
To view, visit https://gerrit.osmocom.org/6880
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id02c8fea51c1260f1baae8566c67bafc5bdb970e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>