aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/bsc_hack.c4
-rw-r--r--openbsc/src/gsm_04_08.c18
2 files changed, 8 insertions, 14 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index 6de6fd2d9..6243b426f 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -1115,7 +1115,6 @@ static void print_help()
printf(" -s --disable-color\n");
printf(" -c --config-file filename The config file to use.\n");
printf(" -l --database db-name The database to use\n");
- printf(" -a --authorize-everyone Allow everyone into the network.\n");
printf(" -r --reject-cause number The reject cause for LOCATION UPDATING REJECT.\n");
printf(" -p --pcap file The filename of the pcap file\n");
printf(" -C --cardnr number For bs11 select E1 card number other than 0\n");
@@ -1165,9 +1164,6 @@ static void handle_options(int argc, char** argv)
case 'c':
config_file = strdup(optarg);
break;
- case 'a':
- gsm0408_allow_everyone(1);
- break;
case 'r':
gsm0408_set_reject_cause(atoi(optarg));
break;
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)