From 9d4f46c975c3a4c92071c70ebadd6edc345581da Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Wed, 17 Dec 2014 13:20:08 +0100 Subject: 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 --- openbsc/src/gprs/sgsn_auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openbsc/src/gprs/sgsn_auth.c') 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); -- cgit v1.2.3