mirror of https://github.com/PentHertz/srsLTE.git
Added attach request as a UL info trasnfer in the UE. Added interface to remove eps bearer map when going idle. Fixed bug in GW in assignment of IPv4 addresses. UE seems to rebound from the service reject now.
This commit is contained in:
parent
8a6c1ea826
commit
8f5ad55c4a
|
@ -129,6 +129,7 @@ public:
|
||||||
BARRING_MT,
|
BARRING_MT,
|
||||||
BARRING_ALL
|
BARRING_ALL
|
||||||
} barring_t;
|
} barring_t;
|
||||||
|
virtual void leave_connected() = 0;
|
||||||
virtual void set_barring(barring_t barring) = 0;
|
virtual void set_barring(barring_t barring) = 0;
|
||||||
virtual void paging(asn1::rrc::s_tmsi_s* ue_identiy) = 0;
|
virtual void paging(asn1::rrc::s_tmsi_s* ue_identiy) = 0;
|
||||||
virtual bool is_attached() = 0;
|
virtual bool is_attached() = 0;
|
||||||
|
|
|
@ -54,6 +54,7 @@ public:
|
||||||
emm_state_t get_state();
|
emm_state_t get_state();
|
||||||
|
|
||||||
// RRC interface
|
// RRC interface
|
||||||
|
void leave_connected();
|
||||||
void paging(asn1::rrc::s_tmsi_s* ue_identiy);
|
void paging(asn1::rrc::s_tmsi_s* ue_identiy);
|
||||||
void set_barring(barring_t barring);
|
void set_barring(barring_t barring);
|
||||||
void write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu);
|
void write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu);
|
||||||
|
|
|
@ -1730,6 +1730,7 @@ void rrc::leave_connected()
|
||||||
drb_up = false;
|
drb_up = false;
|
||||||
security_is_activated = false;
|
security_is_activated = false;
|
||||||
measurements.reset();
|
measurements.reset();
|
||||||
|
nas->leave_connected();
|
||||||
pdcp->reset();
|
pdcp->reset();
|
||||||
rlc->reset();
|
rlc->reset();
|
||||||
phy->reset();
|
phy->reset();
|
||||||
|
|
|
@ -232,6 +232,10 @@ bool nas::detach_request() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nas::leave_connected() {
|
||||||
|
eps_bearer.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool nas::is_attached() {
|
bool nas::is_attached() {
|
||||||
return state == EMM_STATE_REGISTERED;
|
return state == EMM_STATE_REGISTERED;
|
||||||
|
@ -702,6 +706,7 @@ void nas::parse_attach_accept(uint32_t lcid, unique_byte_buffer_t pdu)
|
||||||
nas_log->warning("EMM Cause: %d\n", attach_accept.emm_cause );
|
nas_log->warning("EMM Cause: %d\n", attach_accept.emm_cause );
|
||||||
}
|
}
|
||||||
if (LIBLTE_MME_PDN_TYPE_IPV4 == act_def_eps_bearer_context_req.pdn_addr.pdn_type) {
|
if (LIBLTE_MME_PDN_TYPE_IPV4 == act_def_eps_bearer_context_req.pdn_addr.pdn_type) {
|
||||||
|
ip_addr = 0;
|
||||||
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[0] << 24;
|
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[0] << 24;
|
||||||
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[1] << 16;
|
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[1] << 16;
|
||||||
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[2] << 8;
|
ip_addr |= act_def_eps_bearer_context_req.pdn_addr.addr[2] << 8;
|
||||||
|
@ -1077,7 +1082,7 @@ void nas::parse_service_reject(uint32_t lcid, unique_byte_buffer_t pdu)
|
||||||
LIBLTE_MME_SERVICE_REJECT_MSG_STRUCT service_reject;
|
LIBLTE_MME_SERVICE_REJECT_MSG_STRUCT service_reject;
|
||||||
if (liblte_mme_unpack_service_reject_msg((LIBLTE_BYTE_MSG_STRUCT*)pdu.get(), &service_reject)) {
|
if (liblte_mme_unpack_service_reject_msg((LIBLTE_BYTE_MSG_STRUCT*)pdu.get(), &service_reject)) {
|
||||||
nas_log->error("Error unpacking service reject.\n");
|
nas_log->error("Error unpacking service reject.\n");
|
||||||
goto exit;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nas_log->console("Received service reject with EMM cause=0x%x.\n", service_reject.emm_cause);
|
nas_log->console("Received service reject with EMM cause=0x%x.\n", service_reject.emm_cause);
|
||||||
|
@ -1088,8 +1093,18 @@ void nas::parse_service_reject(uint32_t lcid, unique_byte_buffer_t pdu)
|
||||||
|
|
||||||
// FIXME: handle NAS backoff-timers correctly
|
// FIXME: handle NAS backoff-timers correctly
|
||||||
|
|
||||||
exit:
|
// Mark state as EMM-DEREGISTERED
|
||||||
ctxt.rx_count++;
|
state = EMM_STATE_DEREGISTERED;
|
||||||
|
|
||||||
|
// Reset security context
|
||||||
|
ctxt = {};
|
||||||
|
have_ctxt = false;
|
||||||
|
have_guti = false;
|
||||||
|
|
||||||
|
// Send attach request after receiving service reject
|
||||||
|
pdu->clear();
|
||||||
|
gen_attach_request(pdu.get());
|
||||||
|
rrc->write_sdu(std::move(pdu));
|
||||||
}
|
}
|
||||||
|
|
||||||
void nas::parse_esm_information_request(uint32_t lcid, unique_byte_buffer_t pdu)
|
void nas::parse_esm_information_request(uint32_t lcid, unique_byte_buffer_t pdu)
|
||||||
|
|
Loading…
Reference in New Issue