aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat.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_nat.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_nat.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 8c164a270..d38256587 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -542,15 +542,16 @@ static void update_con_authorize(struct sccp_connections *con,
parsed->gsm_type == BSS_MAP_MSG_CIPHER_MODE_CMD) {
con->authorized = 1;
} else if (parsed->bssap == BSSAP_MSG_DTAP) {
- uint8_t msg_type;
+ uint8_t msg_type, proto;
uint32_t len;
struct gsm48_hdr *hdr48;
hdr48 = bsc_unpack_dtap(parsed, msg, &len);
if (!hdr48)
return;
+ proto = hdr48->proto_discr & 0x0f;
msg_type = hdr48->msg_type & 0xbf;
- if (hdr48->proto_discr == GSM48_PDISC_MM &&
+ if (proto == GSM48_PDISC_MM &&
msg_type == GSM48_MT_MM_CM_SERV_ACC)
con->authorized = 1;
}