aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-19 11:00:13 +0100
committerHarald Welte <laforge@gnumonks.org>2013-07-21 15:44:24 +0800
commit7f6da485f5af0ad5a5a5176c2fc3fe0550beac14 (patch)
treeb8182fc38ce459344c6f7dba8cc1a3e94c5fb1b7 /openbsc/src/gprs/gprs_gmm.c
parentcb5353d8511f7cd36472334402f7ac31dc26327b (diff)
sgsn: add a minimalistic ACL
This adds a minimalistic ACL by which certain, individual roaming IMSIs can be authorized to use the SGSN. So you can selectively bypass the 'MCC+MNC == first 5 digits of IMSI' checking for a couple of IMSIs
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index bb61ab50a..36798e0ac 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -698,7 +698,8 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
* as long as it is part of 'our' network */
char mccmnc[16];
snprintf(mccmnc, sizeof(mccmnc), "%03d%02d", ra_id.mcc, ra_id.mnc);
- if (strncmp(mccmnc, mi_string, 5)) {
+ if (strncmp(mccmnc, mi_string, 5) &&
+ !sgsn_acl_lookup(mi_string)) {
LOGP(DMM, LOGL_INFO, "Rejecting ATTACH REQUESET IMSI=%s\n",
mi_string);
return gsm48_tx_gmm_att_rej_oldmsg(msg,