aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_ussd.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-05 19:13:27 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-03 21:59:29 +0200
commitc09f8a3b7fb94ccef41e33c32bfe2bff1ffe0e44 (patch)
treef58b0988f0c43311fba85579c14a42d3426b5c6e /openbsc/src/osmo-bsc_nat/bsc_ussd.c
parent81dbfe412c8196df443f38bf4fbea4f9897607ef (diff)
filter: Remove nat_sccp_connection from public API
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_ussd.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_ussd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
index 968456b95..224189608 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
@@ -351,7 +351,7 @@ static int forward_ussd(struct nat_sccp_connection *con, const struct ussd_reque
state->invoke_id = req->invoke_id;
memcpy(&state->src_ref, &con->remote_ref, sizeof(con->remote_ref));
memcpy(&state->dst_ref, &con->real_ref, sizeof(con->real_ref));
- memcpy(state->imsi, con->imsi, strlen(con->imsi));
+ memcpy(state->imsi, con->filter_state.imsi, strlen(con->filter_state.imsi));
/* add additional tag/values */
lac = htons(con->lac);
@@ -385,7 +385,7 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
if (con->con_type != NAT_CON_TYPE_SSA)
return 0;
- if (!con->imsi)
+ if (!con->filter_state.imsi)
return 0;
/* We have not verified the IMSI yet */
@@ -400,7 +400,7 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
if (parsed->bssap != BSSAP_MSG_DTAP)
return 0;
- if (strlen(con->imsi) >= GSM_IMSI_LENGTH)
+ if (strlen(con->filter_state.imsi) >= GSM_IMSI_LENGTH)
return 0;
hdr48 = bsc_unpack_dtap(parsed, msg, &len);
@@ -421,7 +421,7 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
if (!lst)
return 0;
- if (bsc_msg_acc_lst_check_allow(lst, con->imsi) != 0)
+ if (bsc_msg_acc_lst_check_allow(lst, con->filter_state.imsi) != 0)
return 0;
/* now decode the message and see if we really want to handle it */
@@ -436,14 +436,15 @@ int bsc_ussd_check(struct nat_sccp_connection *con, struct bsc_nat_parsed *parse
return 0;
/* found a USSD query for our subscriber */
- LOGP(DNAT, LOGL_NOTICE, "Found USSD query for %s\n", con->imsi);
+ LOGP(DNAT, LOGL_NOTICE, "Found USSD query for %s\n",
+ con->filter_state.imsi);
con->ussd_ti[ti] = 1;
if (forward_ussd(con, &req, msg) != 0)
return 0;
return 1;
} else if (msg_type == GSM0480_MTYPE_FACILITY && con->ussd_ti[ti]) {
LOGP(DNAT, LOGL_NOTICE, "Forwarding message part of TI: %d %s\n",
- ti, con->imsi);
+ ti, con->filter_state.imsi);
if (forward_ussd_simple(con, msg) != 0)
return 0;
return 1;