aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-21 19:05:14 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-21 19:05:14 +0800
commite5981edf6a8af5d58154f0ea09b831a3fd9fcaf7 (patch)
tree6aa19715ffe4a45b008799e9dab5052dc4ad4d72 /openbsc/src/nat/bsc_nat.c
parent93cc16ae4f85c8712f50881f094c1ac6882f99f3 (diff)
[nat] Add option to forbid the paging to the BSC.
This can be done for testing purposes and to allow making a BTS crash that can not handle paging requests properly.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index eaa9d30bc..d5a5d2b42 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -311,7 +311,9 @@ send_to_all:
if (parsed->ipa_proto == IPAC_PROTO_SCCP && parsed->gsm_type == BSS_MAP_MSG_PAGING) {
int lac;
bsc = bsc_nat_find_bsc(nat, msg, &lac);
- if (bsc)
+ if (bsc && bsc->cfg->forbid_paging)
+ LOGP(DNAT, LOGL_NOTICE, "Paging forbidden for BTS: %d\n", bsc->cfg->nr);
+ else if (bsc)
bsc_send_data(bsc, msg->l2h, msgb_l2len(msg), parsed->ipa_proto);
else
LOGP(DNAT, LOGL_ERROR, "Could not determine BSC for paging on lac: %d/0x%x\n",