Skip to content
Snippets Groups Projects
  • Michael Walle's avatar
    46c07bcf
    api: net: fix length check in eth_receive() · 46c07bcf
    Michael Walle authored
    
    If the requested length is too small to hold the received packet,
    eth_receive() will return -1 and will leave the packet in the receive
    buffers. Instead of returning an error in this case, we return the first
    portion of the received packet and remove it from the receive buffers.
    
    This fixes FreeBSD's ubldr. Without this patch it will just stop receiving
    packets if the NIC receives more than PKTBUFSRX too large packets.
    
    Signed-off-by: default avatarMichael Walle <michael@walle.cc>
    Cc: Joe Hershberger <joe.hershberger@gmail.com>
    Cc: Rafal Jaworowski <raj@semihalf.com>
    Cc: Piotr Kruszynski <ppk@semihalf.com>
    46c07bcf
    History
    api: net: fix length check in eth_receive()
    Michael Walle authored
    
    If the requested length is too small to hold the received packet,
    eth_receive() will return -1 and will leave the packet in the receive
    buffers. Instead of returning an error in this case, we return the first
    portion of the received packet and remove it from the receive buffers.
    
    This fixes FreeBSD's ubldr. Without this patch it will just stop receiving
    packets if the NIC receives more than PKTBUFSRX too large packets.
    
    Signed-off-by: default avatarMichael Walle <michael@walle.cc>
    Cc: Joe Hershberger <joe.hershberger@gmail.com>
    Cc: Rafal Jaworowski <raj@semihalf.com>
    Cc: Piotr Kruszynski <ppk@semihalf.com>
exports.c 838 B