]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[eepro100] Do not discard short packets
authorMichael Brown <mcb30@ipxe.org>
Sat, 12 Mar 2011 12:48:29 +0000 (12:48 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 12 Mar 2011 12:48:29 +0000 (12:48 +0000)
In a virtual environment such as qemu, we can legitimately receive
packets less than 64 bytes in length, such as ARP replies.  These are
currently discarded, causing most IPv4 communication to fail.

Fix by ignoring the RFDShort bit when receiving packets.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/eepro100.c

index 50214eccd5d87dd27849399092f5aed447c98dfe..85840cdfae2624eae88425339cb113696626a012 100644 (file)
@@ -808,7 +808,7 @@ static void ifec_rx_process ( struct net_device *netdev )
                       cur_rx );
                DBGIO_HD ( (void*)rfd->packet, 0x30 );
 
-               if ( ( status & RFD_STATUS ) != RFD_OK ) {
+               if ( ( status & ( RFD_STATUS & ~RFDShort ) ) != RFD_OK ) {
                        DBG ( "Corrupted packet received. "
                              "Status = %#08hx\n", status );
                        netdev_rx_err ( netdev, iob, -EINVAL );