Fixing a compile issue.

master
Pedro Alvarez 6 years ago
parent 3d2f7d2adf
commit 1826684372

@ -329,19 +329,18 @@ spgw::handle_sgi_pdu(srslte::byte_buffer_t *msg)
bool ip_found = false; bool ip_found = false;
srslte::gtpc_f_teid_ie enb_fteid; srslte::gtpc_f_teid_ie enb_fteid;
version = msg->msg[0]>>4; struct iphdr *iph = (struct iphdr *) msg->msg;
((uint8_t*)&dest_ip)[0] = msg->msg[16]; if(iph->version != 4)
((uint8_t*)&dest_ip)[1] = msg->msg[17]; {
((uint8_t*)&dest_ip)[2] = msg->msg[18]; m_spgw_log->warning("IPv6 not supported yet.\n");
((uint8_t*)&dest_ip)[3] = msg->msg[19]; return;
}
dest_addr.s_addr = dest_ip;
//m_spgw_log->console("IP version: %d\n", version); //m_spgw_log->console("IP version: %d\n", version);
//m_spgw_log->console("Received packet to IP: %s\n", inet_ntoa(dest_addr)); //m_spgw_log->console("Received packet to IP: %s\n", inet_ntoa(iph->daddr));
pthread_mutex_lock(&m_mutex); pthread_mutex_lock(&m_mutex);
gtp_fteid_it = m_ip_to_teid.find(dest_ip); gtp_fteid_it = m_ip_to_teid.find(iph->daddr);
if(gtp_fteid_it != m_ip_to_teid.end()) if(gtp_fteid_it != m_ip_to_teid.end())
{ {
ip_found = true; ip_found = true;

Loading…
Cancel
Save