소스 검색

[eepro100] Do not discard short packets

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>
tags/v1.20.1
Michael Brown 15 년 전
부모
커밋
c315ae0394
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/drivers/net/eepro100.c

+ 1
- 1
src/drivers/net/eepro100.c 파일 보기

808
 		       cur_rx );
808
 		       cur_rx );
809
 		DBGIO_HD ( (void*)rfd->packet, 0x30 );
809
 		DBGIO_HD ( (void*)rfd->packet, 0x30 );
810
 
810
 
811
-		if ( ( status & RFD_STATUS ) != RFD_OK ) {
811
+		if ( ( status & ( RFD_STATUS & ~RFDShort ) ) != RFD_OK ) {
812
 			DBG ( "Corrupted packet received. "
812
 			DBG ( "Corrupted packet received. "
813
 			      "Status = %#08hx\n", status );
813
 			      "Status = %#08hx\n", status );
814
 			netdev_rx_err ( netdev, iob, -EINVAL );
814
 			netdev_rx_err ( netdev, iob, -EINVAL );

Loading…
취소
저장