aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-24 04:50:13 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-24 04:52:38 +0800
commit568b9682e062943b6fd0cd34cebf38d265b2c84f (patch)
tree0a6ceca0e38677f7361a989abceaafe37a030d26 /openbsc/src/nat/bsc_nat.c
parentcf1c8777a4a2bcca7b6735a53b05932f75c2ef10 (diff)
nat: Fix the filter when searching for a identity response
The filter code will return < 0 for error, 0 for unknown subscriber, 1 for subscriber checked. Use the same if construct as for the CR message. This should fix passing LU when it starts with a TMSI of a different network.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 2c0851827..838e8f9e8 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -791,14 +791,14 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
con = patch_sccp_src_ref_to_msc(msg, parsed, bsc);
if (con) {
filter = bsc_nat_filter_dt(bsc, msg, con, parsed);
- if (filter == 0) {
- con_bsc = con->bsc;
- con_msc = con->msc_con;
- con_filter = con->con_local;
- } else {
+ if (filter < 0) {
bsc_send_con_release(bsc, con);
con = NULL;
goto exit2;
+ } else {
+ con_bsc = con->bsc;
+ con_msc = con->msc_con;
+ con_filter = con->con_local;
}
}
break;