aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-11 09:50:31 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-25 21:04:45 +0200
commitc1cac1e31ac89ce533fea50eb1150b29ad260c8c (patch)
tree21dc641a4abd7528b4f1ab67abade0099810e408
parentd1effd835fb8ca5df7d32db0eeee82c1939e1ab9 (diff)
nat: Make the imsi checking function public.
We will use this method in the USSD module to check if the IMSI should be handled for USSD queries.
-rw-r--r--openbsc/include/openbsc/bsc_nat.h1
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 678f1895f..e8a47525c 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -316,6 +316,7 @@ struct bsc_nat_acc_lst *bsc_nat_acc_lst_get(struct bsc_nat *nat, const char *nam
void bsc_nat_acc_lst_delete(struct bsc_nat_acc_lst *lst);
struct bsc_nat_acc_lst_entry *bsc_nat_acc_lst_entry_create(struct bsc_nat_acc_lst *);
+int bsc_nat_lst_check_allow(struct bsc_nat_acc_lst *lst, const char *imsi);
int bsc_nat_msc_is_connected(struct bsc_nat *nat);
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index f88e76697..2fca31dcb 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -288,7 +288,7 @@ int bsc_write_msg(struct write_queue *queue, struct msgb *msg)
return 0;
}
-static int lst_check_allow(struct bsc_nat_acc_lst *lst, const char *mi_string)
+int bsc_nat_lst_check_allow(struct bsc_nat_acc_lst *lst, const char *mi_string)
{
struct bsc_nat_acc_lst_entry *entry;
@@ -335,7 +335,7 @@ static int auth_imsi(struct bsc_connection *bsc, const char *mi_string)
if (bsc_lst) {
/* 1. BSC allow */
- if (lst_check_allow(bsc_lst, mi_string) == 0)
+ if (bsc_nat_lst_check_allow(bsc_lst, mi_string) == 0)
return 1;
/* 2. BSC deny */