diff options
author | Jan Luebbe <jluebbe@debian.org> | 2009-08-12 12:48:00 +0200 |
---|---|---|
committer | Harald Welte (local) <laflocal@hanuman.gnumonks.org> | 2009-08-13 10:14:59 +0200 |
commit | 06513f26a11cb561d6db6797fa34a3b6db136286 (patch) | |
tree | 5828180198143032d430ca783b73e807a05b300f /openbsc/src/gsm_04_08.c | |
parent | 0e451d0f2e249ede7e77effecbc49d8219a1ce85 (diff) |
replace the command line option -a with the auth-policy config option
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r-- | openbsc/src/gsm_04_08.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index f0ec3ff96..65940a0f5 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -304,13 +304,6 @@ struct gsm_lai { u_int16_t lac; }; -static int authorize_everonye = 0; -void gsm0408_allow_everyone(int everyone) -{ - printf("Allowing everyone?\n"); - authorize_everonye = everyone; -} - static int reject_cause = 0; void gsm0408_set_reject_cause(int cause) { @@ -333,10 +326,15 @@ static int authorize_subscriber(struct gsm_loc_updating_operation *loc, if (loc && (loc->waiting_for_imsi || loc->waiting_for_imei)) return 0; - if (authorize_everonye) + switch (subscriber->net->auth_policy) { + case GSM_AUTH_POLICY_CLOSED: + return subscriber->authorized; + case GSM_AUTH_POLICY_ACCEPT_ALL: return 1; - - return subscriber->authorized; + case GSM_AUTH_POLICY_TOKEN: + default: + return 0; + } } static void release_loc_updating_req(struct gsm_lchan *lchan) |