Merge remote-tracking branch 'github_public/master' into next

This commit is contained in:
Andre Puschmann 2018-01-24 20:36:38 +01:00
commit 2afcf1eb30
1 changed files with 6 additions and 1 deletions

View File

@ -837,7 +837,12 @@ void rrc::send_con_request() {
ul_ccch_msg.msg.rrc_con_req.ue_id.s_tmsi = s_tmsi;
} else {
ul_ccch_msg.msg.rrc_con_req.ue_id_type = LIBLTE_RRC_CON_REQ_UE_ID_TYPE_RANDOM_VALUE;
ul_ccch_msg.msg.rrc_con_req.ue_id.random = rand() % 2^40;
// TODO use proper RNG
uint64_t random_id = 0;
for (uint i = 0; i < 5; i++) { // fill random ID bytewise, 40 bits = 5 bytes
random_id |= ( (uint64_t)rand() & 0xFF ) << i*8;
}
ul_ccch_msg.msg.rrc_con_req.ue_id.random = random_id;
}
ul_ccch_msg.msg.rrc_con_req.cause = LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING;