Fixed endianess bug of S-GW address sent to eNB. S-GW now receives upstream user traffic. Starting to strip the gtp-u header.

This commit is contained in:
Pedro Alvarez 2017-12-07 18:34:05 +00:00
parent c838758db2
commit c183ac509d
3 changed files with 10 additions and 1 deletions

View File

@ -77,6 +77,7 @@ public:
void handle_modify_bearer_request(struct srslte::gtpc_pdu *mb_req_pdu, struct srslte::gtpc_pdu *mb_resp_pdu);
void handle_sgi_pdu(srslte::byte_buffer_t *msg);
void handle_s1u_pdu(srslte::byte_buffer_t *msg);
private:

View File

@ -626,7 +626,7 @@ s1ap::send_initial_context_setup_request(uint32_t mme_ue_s1ap_id, struct srslte:
return false;
}
erab_ctxt->transportLayerAddress.n_bits = 32; //IPv4
uint32_t sgw_s1u_ip = cs_resp->eps_bearer_context_created.s1_u_sgw_f_teid.ipv4;
uint32_t sgw_s1u_ip = htonl(cs_resp->eps_bearer_context_created.s1_u_sgw_f_teid.ipv4);
uint8_t *tmp_ptr = erab_ctxt->transportLayerAddress.buffer;
liblte_value_2_bits(sgw_s1u_ip, &tmp_ptr, 32);//FIXME consider ipv6

View File

@ -274,6 +274,7 @@ spgw::run_thread()
msg->N_bytes = recvfrom(m_s1u, msg->msg, SRSLTE_MAX_BUFFER_SIZE_BYTES, 0, &src_addr, &addrlen );
//m_spgw_log->console("Received PDU from S1-U. Bytes %d\n", msg->N_bytes);
//m_spgw_log->debug("Received PDU from S1-U. Bytes %d\n", msg->N_bytes);
handle_s1u_pdu(msg);
}
if (FD_ISSET(m_sgi_if, &set))
{
@ -359,6 +360,13 @@ spgw::handle_sgi_pdu(srslte::byte_buffer_t *msg)
return;
}
void
spgw::handle_s1u_pdu(srslte::byte_buffer_t *msg)
{
m_spgw_log->console("Received PDU from S1-U. Bytes=%d\n",msg->N_bytes);
return;
}
uint64_t
spgw::get_new_ctrl_teid()
{