aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_ussd.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-04-13 18:56:13 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-13 18:56:13 +0200
commit5cde92cb0e447ef9d415918c5194c3e65282ab28 (patch)
tree19518ce48245477d422d61ddc6b3bc01545bfd60 /openbsc/src/osmo-bsc_nat/bsc_ussd.c
parent06009c8d5a251e3803259ca63eec18970e2554a7 (diff)
nat: And out the skip_indicator/transaction id from the gsm48 header
We need to and out the protocol discriminator as call control might have use transactions. This has only failed for the USSD filter so far as this must deal with transactions.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_ussd.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_ussd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
index fd38f7800..48ecad57f 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
@@ -309,6 +309,7 @@ int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed,
{
uint32_t len;
uint8_t msg_type;
+ uint8_t proto;
struct gsm48_hdr *hdr48;
struct bsc_nat_acc_lst *lst;
struct ussd_request req;
@@ -343,8 +344,9 @@ int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed,
if (!hdr48)
return 0;
+ proto = hdr48->proto_discr & 0x0f;
msg_type = hdr48->msg_type & 0xbf;
- if (hdr48->proto_discr != GSM48_PDISC_NC_SS || msg_type != GSM0480_MTYPE_REGISTER)
+ if (proto != GSM48_PDISC_NC_SS || msg_type != GSM0480_MTYPE_REGISTER)
return 0;
/* now check if it is a IMSI we care about */