]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[forcedeth] Remove software unicast MAC address filter
authorMichael Brown <mcb30@ipxe.org>
Tue, 29 Mar 2011 20:55:04 +0000 (21:55 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 29 Mar 2011 20:57:31 +0000 (21:57 +0100)
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>
src/drivers/net/forcedeth.c

index a54eae441f3496d71ff7f21d6f88a1baf7ba43dd..bb3d68447554cf5608fd8f102f7ac63ec2676cf3 100644 (file)
@@ -934,15 +934,8 @@ nv_process_rx_packets ( struct net_device *netdev )
                } else {
                        len = flags & LEN_MASK_V1;
 
-                       /* Filter any frames that have as destination address a
-                        * local MAC address but are not meant for this NIC */
-                       if ( is_local_ether_addr ( curr_iob->data ) &&
-                            memcmp ( curr_iob->data, netdev->hw_addr, ETH_ALEN ) ) {
-                               free_iob ( curr_iob );
-                       } else {
-                               iob_put ( curr_iob, len );
-                               netdev_rx ( netdev, curr_iob );
-                       }
+                       iob_put ( curr_iob, len );
+                       netdev_rx ( netdev, curr_iob );
                }
 
                /* Invalidate iobuf */