mirror of
https://github.com/ipxe/ipxe
synced 2026-01-09 21:53:37 +03:00
[netdevice] Pass both link-layer addresses in net_tx() and net_rx()
FCoE requires the use of fabric-provided MAC addresses, which breaks the assumption that the net device's MAC address is implicitly the source address for net_tx() and the (unicast) destination address for net_rx(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -36,13 +36,13 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
*
|
||||
* @v iob I/O buffer
|
||||
* @v netdev Network device
|
||||
* @v ll_dest Link-layer destination address
|
||||
* @v ll_source Link-layer source address
|
||||
*
|
||||
* This function takes ownership of the I/O buffer passed to it.
|
||||
*/
|
||||
static int eapol_rx ( struct io_buffer *iob, struct net_device *netdev,
|
||||
const void *ll_source )
|
||||
{
|
||||
const void *ll_dest, const void *ll_source ) {
|
||||
struct eapol_frame *eapol = iob->data;
|
||||
struct eapol_handler *handler;
|
||||
|
||||
@@ -54,7 +54,7 @@ static int eapol_rx ( struct io_buffer *iob, struct net_device *netdev,
|
||||
for_each_table_entry ( handler, EAPOL_HANDLERS ) {
|
||||
if ( handler->type == eapol->type ) {
|
||||
iob_pull ( iob, EAPOL_HDR_LEN );
|
||||
return handler->rx ( iob, netdev, ll_source );
|
||||
return handler->rx ( iob, netdev, ll_dest, ll_source );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user