Merged in BazookaJoe1900/nuttx/pr-network_stm32_freebuffer (pull request #1030)

Large ethernet packet can leads network halt

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Bazooka Joe 2019-09-16 13:52:56 +00:00 committed by Gregory Nutt
parent 8fa646f0e8
commit ec4a7be5c2

View File

@ -1796,7 +1796,17 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
{
nwarn("WARNING: DROPPED Too big: %d\n", dev->d_len);
nerr("ERROR: Dropped, Too big: %d\n", dev->d_len);
/* Free dropped packet buffer */
if (dev->d_buf)
{
stm32_freebuffer(priv, dev->d_buf);
dev->d_buf = NULL;
dev->d_len = 0;
}
continue;
}