aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-03 14:42:00 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-03 16:15:11 +0200
commit0b6c8e0e73e5728666fdf75d79e1060ce3ee89bc (patch)
treee663efd617031b06885d39a4c8e38f41ad139e78
parent81a625cbe5d094452bd0150df9d29f3e00a407c8 (diff)
nat: Forget about the con->msc_con once we see a RLSD/CLEAR COMMAND
In case we have a local connection and the MSC wants to remove the connection, we will ignore it. But let us set the msc_con to NULL so in the future we will be able to control/check if the connection should be kept around or not.
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index fd9356032..10aae3427 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -703,10 +703,12 @@ static int forward_sccp_to_bts(struct bsc_msc_connection *msc_con, struct msgb *
} else if (con && is_local_connection(con)
&& parsed->gsm_type == BSS_MAP_MSG_CLEAR_CMD) {
LOGP(DNAT, LOGL_NOTICE, "Clear Command for local connection. Ignoring.\n");
+ con->msc_con = NULL;
con = NULL;
} else if (con && con->con_local == NAT_CON_END_CALL
&& parsed->sccp_type == SCCP_MSG_TYPE_RLSD) {
LOGP(DNAT, LOGL_NOTICE, "Ignoring RLSD for local CC connection.\n");
+ con->msc_con = NULL;
con = NULL;
}
break;