aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm48.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-03-22 13:17:09 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-03-22 14:23:51 +0100
commit559a6ee68359dab691a483573982e6f8c6439ae2 (patch)
tree1e4648154e18ae26882776086a1ce20ef851223a /src/gsm/gsm48.c
parent25127fb749ad241cfe3b9eefbaba1303f261ec88 (diff)
Fix parsing of TLV_TYPE_SINGLE_TV
The decoding path of TLV_TYPE_SINGLE_TV is wrong, since it is not shifting right the tag before using it. On the other hand, the encoding path (tlv_encode_one) is doing that, so it is clear there's a bug. It seems that in order to workaround the bug some IEs in gsm_04_08.h (TS 24.008 and TS 44.018) were defined incorrectly (eg 0x80) while the spec clearly assigns eg. "8" to it, and makes sure no full byte IEI collides. Some other IEIs like GSM48_IE_GMM_CIPH_CKSN which are also of the same type were already correctly defined as 0x08. Change-Id: I799e35dc8d4d153fa63bf50563a5482cdf4de2d7
Diffstat (limited to 'src/gsm/gsm48.c')
-rw-r--r--src/gsm/gsm48.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 919500bc..16578644 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -129,10 +129,10 @@ const struct tlv_definition gsm48_rr_att_tlvdef = {
[GSM48_IE_REALTIME_DIFF] = { TLV_TYPE_TLV },
[GSM48_IE_START_TIME] = { TLV_TYPE_FIXED, 2 },
[GSM48_IE_TIMING_ADVANCE] = { TLV_TYPE_TV },
- [GSM48_IE_GROUP_CIP_SEQ] = { TLV_TYPE_SINGLE_TV },
- [GSM48_IE_CIP_MODE_SET] = { TLV_TYPE_SINGLE_TV },
- [GSM48_IE_GPRS_RESUMPT] = { TLV_TYPE_SINGLE_TV },
- [GSM48_IE_SYNC_IND] = { TLV_TYPE_SINGLE_TV },
+ [GSM48_IE_GROUP_CIP_SEQ_HO] = { TLV_TYPE_SINGLE_TV },
+ [GSM48_IE_CIP_MODE_SET_HO] = { TLV_TYPE_SINGLE_TV },
+ [GSM48_IE_GPRS_RESUMPT_HO] = { TLV_TYPE_SINGLE_TV },
+ [GSM48_IE_SYNC_IND_HO] = { TLV_TYPE_SINGLE_TV },
},
};
@@ -148,7 +148,7 @@ const struct tlv_definition gsm48_mm_att_tlvdef = {
[GSM48_IE_NET_DST] = { TLV_TYPE_TLV },
[GSM48_IE_LOCATION_AREA] = { TLV_TYPE_FIXED, 5 },
- [GSM48_IE_PRIORITY_LEV] = { TLV_TYPE_SINGLE_TV },
+ [GSM48_IE_PRIORITY_LEV_HO] = { TLV_TYPE_SINGLE_TV },
[GSM48_IE_FOLLOW_ON_PROC] = { TLV_TYPE_T },
[GSM48_IE_CTS_PERMISSION] = { TLV_TYPE_T },
},