Commit dfcffb62 authored by Gary Wong's avatar Gary Wong

Be permissive about the UE's IMEI.

Accept attaches from any IMEI, and look up user based on IMSI instead.
parent 829f2cc1
......@@ -306,6 +306,10 @@ bool LTE_fdd_enb_hss::is_imsi_allowed(uint64 imsi)
}
bool LTE_fdd_enb_hss::is_imei_allowed(uint64 imei)
{
#if 1
/* be very permissive about IMEI -- gary */
return true;
#else
libtools_scoped_lock lock(user_sem);
std::list<LTE_FDD_ENB_HSS_USER_STRUCT *>::iterator iter;
bool ret = false;
......@@ -320,6 +324,7 @@ bool LTE_fdd_enb_hss::is_imei_allowed(uint64 imei)
}
return(ret);
#endif
}
LTE_FDD_ENB_USER_ID_STRUCT* LTE_fdd_enb_hss::get_user_id_from_imsi(uint64 imsi)
{
......
......@@ -213,7 +213,7 @@ void LTE_fdd_enb_mac::stop(void)
/***********************/
void LTE_fdd_enb_mac::handle_phy_msg(LTE_FDD_ENB_MESSAGE_STRUCT &msg)
{
if( msg.type != 3 && msg.type != 4 )
if( msg.type != 2 && msg.type != 3 && msg.type != 4 )
interface->send_debug_msg(LTE_FDD_ENB_DEBUG_TYPE_INFO,
LTE_FDD_ENB_DEBUG_LEVEL_MAC,
__FILE__,
......
......@@ -676,7 +676,7 @@ void LTE_fdd_enb_mme::parse_attach_request(LIBLTE_BYTE_MSG_STRUCT *msg,
if((*user)->get_eea_support(0) && (*user)->get_eia_support(2))
{
(*rb)->set_mme_state(LTE_FDD_ENB_MME_STATE_AUTHENTICATE);
(*user)->set_id(hss->get_user_id_from_imei(imei_num));
(*user)->set_id(hss->get_user_id_from_imsi(imsi_num)); /* changed from IMEI to IMSI -- gary */
}else{
(*user)->set_emm_cause(LIBLTE_MME_EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH);
(*rb)->set_mme_state(LTE_FDD_ENB_MME_STATE_REJECT);
......@@ -894,7 +894,7 @@ void LTE_fdd_enb_mme::parse_identity_response(LIBLTE_BYTE_MSG_STRUCT *msg,
if(user->get_eea_support(0) && user->get_eia_support(2))
{
rb->set_mme_state(LTE_FDD_ENB_MME_STATE_AUTHENTICATE);
user->set_id(hss->get_user_id_from_imei(imei_num));
user->set_id(hss->get_user_id_from_imsi(imsi_num)); /* changed from IMEI to IMSI -- gary */
}else{
user->set_emm_cause(LIBLTE_MME_EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH);
rb->set_mme_state(LTE_FDD_ENB_MME_STATE_REJECT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment