aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-14 22:22:19 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-14 22:24:36 +0800
commit1ae7b7c372f6e262e21593ab36dd6637da3afdd3 (patch)
treeb7e3add90724a4a75c12cbf3ce5c72d7a742d70b /openbsc
parente265db68b062d9726a82c6b50c1c397e4a2170b7 (diff)
[nat] We do not want to see the actual matches.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index 43b4fb0d0..bb0d96963 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -196,8 +196,6 @@ int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int proto)
/* apply white/black list */
static int auth_imsi(struct bsc_connection *bsc, const char *mi_string)
{
- regmatch_t match[1];
-
/*
* Now apply blacklist/whitelist of the BSC and the NAT.
* 1.) Reject if the IMSI is not allowed at the BSC
@@ -208,7 +206,7 @@ static int auth_imsi(struct bsc_connection *bsc, const char *mi_string)
/* 1. BSC deny */
if (bsc->cfg->imsi_deny) {
- if (regexec(&bsc->cfg->imsi_deny_re, mi_string, 1, match, 0) == 0) {
+ if (regexec(&bsc->cfg->imsi_deny_re, mi_string, 0, NULL, 0) == 0) {
LOGP(DNAT, LOGL_ERROR,
"Filtering %s by imsi_deny.\n", mi_string);
return -2;
@@ -217,13 +215,13 @@ static int auth_imsi(struct bsc_connection *bsc, const char *mi_string)
/* 2. BSC allow */
if (bsc->cfg->imsi_allow) {
- if (regexec(&bsc->cfg->imsi_allow_re, mi_string, 1, match, 0) == 0)
+ if (regexec(&bsc->cfg->imsi_allow_re, mi_string, 0, NULL, 0) == 0)
return 0;
}
/* 3. NAT deny */
if (bsc->nat->imsi_deny) {
- if (regexec(&bsc->nat->imsi_deny_re, mi_string, 1, match, 0) == 0) {
+ if (regexec(&bsc->nat->imsi_deny_re, mi_string, 0, NULL, 0) == 0) {
LOGP(DNAT, LOGL_ERROR,
"Filtering %s by nat imsi_deny.\n", mi_string);
return -3;