diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-12-17 13:20:08 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-18 13:18:35 +0100 |
commit | 9d4f46c975c3a4c92071c70ebadd6edc345581da (patch) | |
tree | 0377a2be02aaa98d38ff7e843059d04b9963a4c7 /openbsc/src/gprs/sgsn_auth.c | |
parent | 39f040d62b16b2d99352f5facd83ce098fa2f462 (diff) |
sgsn: Replace subscr.authenticate by global require_authentication flag
Currently the flag 'authenticate' is managed per subscriber.
This patch replaces that flag by a global cfg.require_authentication
flag that enables/disables the use of the Auth & Ciph procedure for
every subscriber. The flag is set by the VTY, if and only if the
authorization policy is 'remote'.
The VTY command
- update-subscriber imsi IMSI insert authenticate <0-1>
is removed.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/sgsn_auth.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/gprs/sgsn_auth.c b/openbsc/src/gprs/sgsn_auth.c index 3755a51d4..83372e857 100644 --- a/openbsc/src/gprs/sgsn_auth.c +++ b/openbsc/src/gprs/sgsn_auth.c @@ -110,7 +110,7 @@ enum sgsn_auth_state sgsn_auth_state(struct sgsn_mm_ctx *mmctx) if (mmctx->subscr->flags & GPRS_SUBSCRIBER_UPDATE_PENDING_MASK) return mmctx->auth_state; - if (mmctx->subscr->sgsn_data->authenticate && + if (sgsn->cfg.require_authentication && (!mmctx->is_authenticated || mmctx->subscr->sgsn_data->auth_triplets_updated)) return SGSN_AUTH_AUTHENTICATE; @@ -171,7 +171,7 @@ int sgsn_auth_request(struct sgsn_mm_ctx *mmctx) OSMO_ASSERT(mmctx->subscr != NULL); - if (mmctx->subscr->sgsn_data->authenticate && !mmctx->is_authenticated) { + if (sgsn->cfg.require_authentication && !mmctx->is_authenticated) { /* Find next tuple */ at = sgsn_auth_get_tuple(mmctx, mmctx->auth_triplet.key_seq); |