diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-03 21:14:47 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-03 21:17:43 +0100 |
commit | 143aed7fa61adac6db7c7b628351cacd7a7f0cf6 (patch) | |
tree | bfa3ca02162c16f12f91d5dcccc8142a0e290ab6 /include | |
parent | cd82710be7276c4276d85a109248f94d5720def4 (diff) |
gsm48_hdr_msg_type[_r99]: Fix bit-masks
TS 24.007 is quite clear: The upper two bits of the message type
octet are *not* part of the message type in any of the L3 protocols
which implement sequence numbers. it doesn't matter if it's R98 or
R99, or whether the sequence number is 1bit or 2bits wide.
Related: OS#2908
Change-Id: Iec875a77f5458322dfbef174f5abfc0e8c09d464
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_04_08.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index e54084f0..4fb8a7f0 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1001,7 +1001,7 @@ static inline uint8_t gsm48_hdr_msg_type_r98(const struct gsm48_hdr *hdr) case GSM48_PDISC_GROUP_CC: case GSM48_PDISC_BCAST_CC: case GSM48_PDISC_LOC: - return hdr->msg_type & 0xbf; + return hdr->msg_type & 0x3f; default: return hdr->msg_type; } @@ -1022,7 +1022,7 @@ static inline uint8_t gsm48_hdr_msg_type_r99(const struct gsm48_hdr *hdr) case GSM48_PDISC_GROUP_CC: case GSM48_PDISC_BCAST_CC: case GSM48_PDISC_LOC: - return hdr->msg_type & 0xbf; + return hdr->msg_type & 0x3f; default: return hdr->msg_type; } |