Browse Source

[forcedeth] Remove software unicast MAC address filter

The forcedeth driver currently implements unicast MAC address
filtering in software.  This is almost invariably the wrong thing to
do (since the network stack must already be able to cope with unwanted
packets) and it breaks FCoE (which requires the card to operate in
promiscuous mode).

Also, the implementation is buggy: is_local_ether_addr() is used to
check for a locally-assigned Ethernet address (not to check for a
unicast address), and the current link-layer address is in
netdev->ll_addr, not netdev->hw_addr.

Fix by removing this code.

Reported-by: Tal Aloni <tal.aloni.il@gmail.com>
Tested-by: Tal Aloni <tal.aloni.il@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
797c29adda
1 changed files with 2 additions and 9 deletions
  1. 2
    9
      src/drivers/net/forcedeth.c

+ 2
- 9
src/drivers/net/forcedeth.c View File

934
 		} else {
934
 		} else {
935
 			len = flags & LEN_MASK_V1;
935
 			len = flags & LEN_MASK_V1;
936
 
936
 
937
-			/* Filter any frames that have as destination address a
938
-			 * local MAC address but are not meant for this NIC */
939
-			if ( is_local_ether_addr ( curr_iob->data ) &&
940
-			     memcmp ( curr_iob->data, netdev->hw_addr, ETH_ALEN ) ) {
941
-				free_iob ( curr_iob );
942
-			} else {
943
-				iob_put ( curr_iob, len );
944
-				netdev_rx ( netdev, curr_iob );
945
-			}
937
+			iob_put ( curr_iob, len );
938
+			netdev_rx ( netdev, curr_iob );
946
 		}
939
 		}
947
 
940
 
948
 		/* Invalidate iobuf */
941
 		/* Invalidate iobuf */

Loading…
Cancel
Save