pespin submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved lynxis lazus: Looks good to me, but someone else must approve
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(-)

diff --git a/src/osmo-hnbgw/hnbgw_l3.c b/src/osmo-hnbgw/hnbgw_l3.c
index 5ff1602..a6c44f7 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 change 39482. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I570eb31dcee94a3ebef25e15ac7cd7199ec9a79e
Gerrit-Change-Number: 39482
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>