fix USSD: SS message type mask should be 0x3f, not 0xbf

See 04.80[1], section 3.4: the highest two bits are used as counter or ignored
and do not contribute to the SS "Miscellaneous message group". Previous mask of
0xbf included the highest bit, fix to 0x3f.

Observed a value of 0xbb that should mean 0x3b="Register" during testing of 3G
USSD requests, which seem to be the first to send a nonzero highest bit to our
code. The erratic mask of 0xbf lead to an unhandled message type of 0xbb.

[1] 3GPP TS 24.080 version 7.2.0 Release 7 / ETSI TS 124 080 V7.2.0 (2006-09)

Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055
This commit is contained in:
Neels Hofmeyr 2016-10-10 22:46:20 +02:00 committed by Harald Welte
parent ed9d6da5df
commit a95ee5e6e1
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ int gsm0480_decode_ss_request(const struct gsm48_hdr *hdr, uint16_t len,
static int parse_ss(const struct gsm48_hdr *hdr, uint16_t len, struct ss_request *req)
{
int rc = 1;
uint8_t msg_type = hdr->msg_type & 0xBF; /* message-type - section 3.4 */
uint8_t msg_type = hdr->msg_type & 0x3F; /* message-type - section 3.4 */
switch (msg_type) {
case GSM0480_MTYPE_RELEASE_COMPLETE: