aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-15 00:41:19 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-15 18:58:35 +0800
commit909e61fddcdd97ed1bb8c44951f12dc3590f6521 (patch)
tree0e8c10bdc0045f1d827bc15293a6cd61dcf8280a /openbsc/src/nat/bsc_nat.c
parent3837f99e89f9e02425726d4e32d4f413769b66ea (diff)
nat: Remember if we have check the imsi.
Return -1 if the IMSI should be filtered, 0 if the IMSI could not be checked and 1 if the IMSI was checked and allowed to pass. In the future this will be used to inspect every message coming by.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 1f45e4587..31009bb30 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -713,7 +713,7 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
switch (parsed->sccp_type) {
case SCCP_MSG_TYPE_CR:
filter = bsc_nat_filter_sccp_cr(bsc, msg, parsed, &con_type);
- if (filter != 0)
+ if (filter < 0)
goto exit3;
if (!create_sccp_src_ref(bsc, parsed))
goto exit2;
@@ -721,6 +721,7 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
con->msc_con = bsc->nat->msc_con;
con_msc = con->msc_con;
con->con_type = con_type;
+ con->imsi_checked = filter;
con_bsc = con->bsc;
break;
case SCCP_MSG_TYPE_RLSD: