summaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-15 17:39:44 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-15 18:58:37 +0800
commit09ecda49d7e12412d50e85109e3f3dc81d76927f (patch)
tree3b2eb213c518ea3434c5f7f60a46246fcce1e79f /openbsc/src/nat/bsc_nat.c
parente8223cae3d95a82b478e355d99036a0b2062c4fb (diff)
nat: Check if the connection was filtered before the msc connection
This way we avoid seeing many warnings that we will not forward data to the MSC. For the con_local connections that is actually the idea, we will not forward them to the MSC.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index e71ab0fcf..738b7ef39 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -833,6 +833,10 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
goto exit2;
}
+ /* do not forward messages to the MSC */
+ if (con_filter)
+ goto exit2;
+
if (!con_msc) {
LOGP(DNAT, LOGL_ERROR, "Not forwarding data bsc_nr: %d ipa: %d type: 0x%x\n",
bsc->cfg->nr,
@@ -841,10 +845,6 @@ static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
goto exit2;
}
- /* do not forward messages to the MSC */
- if (con_filter)
- goto exit2;
-
/* send the non-filtered but maybe modified msg */
queue_for_msc(con_msc, msg);
talloc_free(parsed);