pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32493 )
Change subject: gmm: Append 'P-TMSI type' IE to GPRS Attach Req when needed ......................................................................
gmm: Append 'P-TMSI type' IE to GPRS Attach Req when needed
Depends: libosmocore.git Change-Id Ief4e03785f01f07c8d97b33bbb55c89a863baccc Change-Id: I79d8f2dae356fc25467553955f43fffb2661ab47 --- M src/gmm/gmm_pdu.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/93/32493/1
diff --git a/src/gmm/gmm_pdu.c b/src/gmm/gmm_pdu.c index 4123e24..efdca48 100644 --- a/src/gmm/gmm_pdu.c +++ b/src/gmm/gmm_pdu.c @@ -132,6 +132,7 @@ const struct tlv_definition gprs_gmm_att_tlvdef = { .def = { [GSM48_IE_GMM_CIPH_CKSN] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_PTMSI_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, [GSM48_IE_GMM_TIMER_READY] = { TLV_TYPE_TV, 1 }, [GSM48_IE_GMM_ALLOC_PTMSI] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_PTMSI_SIG] = { TLV_TYPE_FIXED, 3 }, @@ -236,6 +237,14 @@ return -EINVAL;
/* TODO: optional fields */ + + /* 9.4.1.13 P-TMSI type: The MS shall include this IE if the + * type of identity in the Mobile identity IE is set to + * "TMSI/P-TMSI/M-TMSI". */ + if (!attach_with_imsi) { + uint8_t ptmsi_type_native = 1; /* Table 10.5.5.29.1 */ + msgb_v_put(msg, (GSM48_IE_GMM_PTMSI_TYPE << 4) | (ptmsi_type_native & 0x01)); + } return 0; }