pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39482?usp=email )
Change subject: peek_l3_ul_nas: Parse PTMSI MI from GMM RAU req
......................................................................
peek_l3_ul_nas: Parse PTMSI MI from GMM RAU req
old_ra param in decode_gmm_tlv() is dropped since it was not really
used, and all callers already parse old_ra in the manual mandatory
parsing step.
Related: OS#6717
Change-Id: I570eb31dcee94a3ebef25e15ac7cd7199ec9a79e
---
M src/osmo-hnbgw/hnbgw_l3.c
1 file changed, 11 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/82/39482/1
diff --git a/src/osmo-hnbgw/hnbgw_l3.c b/src/osmo-hnbgw/hnbgw_l3.c
index 591f3a5..33b8637 100644
--- a/src/osmo-hnbgw/hnbgw_l3.c
+++ b/src/osmo-hnbgw/hnbgw_l3.c
@@ -50,10 +50,8 @@
},
};
-static void decode_gmm_tlv(struct osmo_mobile_identity *mi,
- struct osmo_routing_area_id *old_ra,
- int *nri,
- const uint8_t *tlv_data, size_t tlv_len, bool allow_hex)
+static void decode_gmm_tlv(struct osmo_mobile_identity *mi, int *nri,
+ const uint8_t *tlv_data, size_t tlv_len, bool allow_hex)
{
struct tlv_parsed tp;
struct tlv_p_entry *e;
@@ -66,6 +64,11 @@
*nri <<= 2;
*nri |= e->val[1] >> 6;
}
+
+ /* RAU Req: 9.4.14.5 P-TMSI (Iu mode only): "This IE shall be included by the
MS." */
+ e = TLVP_GET(&tp, GSM48_IE_GMM_ALLOC_PTMSI);
+ if (mi && e)
+ osmo_mobile_identity_decode(mi, e->val, e->len, allow_hex);
}
/* Parse 3GPP TS 24.008 § 9.4.1 Attach request */
@@ -123,7 +126,9 @@
if (l3_len == (cur - l3_data))
return 0; /* No Optional TLV section */
- decode_gmm_tlv(mi, old_ra, nri, cur, end - cur, allow_hex);
+
+ /* Mobile identity = NULL: already obtained from Mandatory IE above.*/
+ decode_gmm_tlv(NULL, nri, cur, end - cur, allow_hex);
return 0;
}
@@ -163,7 +168,7 @@
if (l3_len == (cur - l3_data))
return 0; /* No Optional TLV section */
- decode_gmm_tlv(mi, old_ra, nri, cur, end - cur, allow_hex);
+ decode_gmm_tlv(mi, nri, cur, end - cur, allow_hex);
return 0;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39482?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I570eb31dcee94a3ebef25e15ac7cd7199ec9a79e
Gerrit-Change-Number: 39482
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>