lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39247?usp=email ) Change subject: gprs_gmm_util: use a RAU specific TLV dictionary ...................................................................... gprs_gmm_util: use a RAU specific TLV dictionary Limit the known and allowed TLVs according to the spec. Change-Id: I460971deeebc9977a984937c542b263d941e78df --- M src/sgsn/gprs_gmm_util.c 1 file changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/39247/1 diff --git a/src/sgsn/gprs_gmm_util.c b/src/sgsn/gprs_gmm_util.c index 549e0b1..b0c9a46 100644 --- a/src/sgsn/gprs_gmm_util.c +++ b/src/sgsn/gprs_gmm_util.c @@ -89,6 +89,38 @@ }; + +const struct tlv_definition gsm48_gmm_rau_ie_tlvdef = { + .def = { + [GSM48_IE_GMM_PTMSI_SIG] = { TLV_TYPE_FIXED, 3 }, + [GSM48_IE_GMM_TIMER_READY] = { TLV_TYPE_TV, 1 }, + [GSM48_IE_GMM_DRX_PARAM] = { TLV_TYPE_FIXED, 2 }, + [GSM48_IE_GMM_TMSI_STATUS] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_ALLOC_PTMSI] = { TLV_TYPE_TLV, 5 }, + [GSM48_IE_GMM_MS_NET_CAPA] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_PDP_CTX_STATUS] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_PS_LCS_CAPA] = { TLV_TYPE_TLV, 1 }, + [GSM48_IE_GMM_GMM_MBMS_CTX_ST] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_UE_NET_CAP] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_ADD_IDENTITY] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_RAI2] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_MS_CLASSMARK2] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_MS_CLASSMARK3] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_SUPP_CODEC_LIST] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_VD_PREF_UE_USAGE] = { TLV_TYPE_TLV, 1 }, + [GSM48_IE_GMM_PTMSI_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_DEVICE_PROP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_MS_NET_FEAT_SUP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_OLD_LAI] = { TLV_TYPE_TLV, 5 }, + [GSM48_IE_GMM_ADD_UPDATE_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_TMSI_BASED_NRI_C] = { TLV_TYPE_TLV, 4 }, + [GMM48_IE_GMM_TIMER_T3324] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_TIMER_T3312_EXT] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_EXT_DRX_PARAMS] = { TLV_TYPE_TLV, 3 }, + } +}; + + /*! Parse 24.008 9.4.1 Attach Request * \param[in] msg l3 pointers must point to gmm. * \param[out] rau_req parsed RA update request @@ -230,8 +262,8 @@ if (msgb_l3len(msg) == mandatory_fields_len) return 0; - ret = tlv_parse(&rau_req->tlv, &gsm48_gmm_ie_tlvdef, - cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); + ret = tlv_parse(&rau_req->tlv, &gsm48_gmm_rau_ie_tlvdef, + cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); if (ret < 0) return GMM_CAUSE_COND_IE_ERR; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39247?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I460971deeebc9977a984937c542b263d941e78df Gerrit-Change-Number: 39247 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>