Ignore PDCP status PDUs, instead of passing them to the GW. Check on the GW if the packet is large enough to hold an IPv4 header.

master
Pedro Alvarez 6 years ago committed by Ismael Gomez
parent 11d42acb3a
commit 9b6aaac1b5

@ -199,9 +199,17 @@ void pdcp_entity::write_pdu(unique_byte_buffer_t pdu)
return;
}
pthread_mutex_lock(&mutex);
if (cfg.is_data) {
// Check PDCP control messages
if ((pdu->msg[0] & 0x80) == 0) {
log->debug("Unhandled PDCP Control PDU\n");
goto exit; // TODO handle PDCP control PDUs
}
// Handle DRB messages
if (rlc->rb_is_um(lcid)) {
handle_um_drb_pdu(pdu);

@ -127,6 +127,9 @@ void gw::write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu)
dl_tput_bytes += pdu->N_bytes;
if (!if_up) {
log.warning("TUN/TAP not up - dropping gw RX message\n");
} else if (pdu->N_bytes < 20) {
// Packet not large enough to hold IPv4 Header
log.warning("Packet to small to hold IPv4 header. Dropping packet with %d B\n", pdu->N_bytes);
} else {
// Only handle IPv4 and IPv6 packets
struct iphdr* ip_pkt = (struct iphdr*)pdu->msg;

Loading…
Cancel
Save