Commit 99c08227 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

i40e: avoid crash if packet received before queue initialized

parent 07757fdc
......@@ -260,6 +260,9 @@ void lan_queue_rx::packet_received(const void *data, size_t pktlen)
{
size_t num_descs = (pktlen + dbuff_size - 1) / dbuff_size;
if (!enabled)
return;
if (dcache.size() < num_descs) {
#ifdef DEBUG_LAN
log << " not enough rx descs (" << num_descs << ", dropping packet" <<
......
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