aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-07 09:06:26 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-07 09:06:26 +0200
commit0ac00c15b9fd667da80670440916ce2982eece20 (patch)
tree278d85b06b5b587858d9146d43238efe780b6fdd
parent8ccf06c58b2f5fc2d95bc199dea5c39f7201a3c4 (diff)
nat: Check the con->imsi for the tracked IMSI
On DT messages we directly write into the tracked SCCP connection. This means "imsi" will always be NULL at this check. Change the code to use con->imsi Fixes: Coverity CID 1293151
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 2f6711a53..93a91450c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1093,8 +1093,8 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
filter = bsc_nat_filter_dt(bsc, msg,
con, parsed, &cause);
if (filter < 0) {
- if (imsi)
- bsc_nat_inform_reject(bsc, imsi);
+ if (con->imsi)
+ bsc_nat_inform_reject(bsc, con->imsi);
bsc_stat_reject(filter, bsc, 1);
bsc_send_con_release(bsc, con, &cause);
con = NULL;