aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-21 17:13:51 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-21 17:13:51 +0200
commit0b03f16cdbca0d77e19fc85ed8ac26f542548aa4 (patch)
treec7d7b0bc6811c6e8fe143f1ea77518ce943530a3 /openbsc/src/osmo-bsc_nat
parent71dd06cfcb7d13c38a7dc098f05ae74ea9152567 (diff)
ussd: Ignore connection release/clear from the MSC
In case this is a local USSD connection we will ignore the clear command and respond with a RLC to any RLSD but will never forward that to the BSC. This way the external USSD is fully in charge of the connection. There are theoretical issues if there are multiple transactions on the same SCCP Connection but this can not be solved properly right now.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 4a6e36d91..295074593 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -608,6 +608,11 @@ static int forward_sccp_to_bts(struct bsc_msc_connection *msc_con, struct msgb *
goto send_to_all;
break;
case SCCP_MSG_TYPE_RLSD:
+ if (con && con->con_local == NAT_CON_END_USSD) {
+ LOGP(DNAT, LOGL_NOTICE, "RLSD for a USSD connection. Ignoring.\n");
+ con = NULL;
+ }
+ /* fall through */
case SCCP_MSG_TYPE_CREF:
case SCCP_MSG_TYPE_DT1:
case SCCP_MSG_TYPE_IT:
@@ -623,6 +628,10 @@ static int forward_sccp_to_bts(struct bsc_msc_connection *msc_con, struct msgb *
LOGP(DNAT, LOGL_ERROR, "Failed to assign...\n");
} else
LOGP(DNAT, LOGL_ERROR, "Assignment command but no BSC.\n");
+ } else if (con && con->con_local == NAT_CON_END_USSD &&
+ parsed->gsm_type == BSS_MAP_MSG_CLEAR_CMD) {
+ LOGP(DNAT, LOGL_NOTICE, "Clear Command for USSD Connection. Ignoring.\n");
+ con = NULL;
}
break;
case SCCP_MSG_TYPE_CC: