From 88dd921e24af0893734d4e197d646cfc7732ed54 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 7 Oct 2010 16:03:16 +0100 Subject: [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 --- src/net/ipv4.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/net/ipv4.c') diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 5918bbecf..f6a1e6e0f 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -355,7 +355,8 @@ static int ipv4_tx ( struct io_buffer *iobuf, ntohs ( iphdr->ident ), ntohs ( iphdr->chksum ) ); /* Hand off to link layer */ - if ( ( rc = net_tx ( iobuf, netdev, &ipv4_protocol, ll_dest ) ) != 0 ) { + if ( ( rc = net_tx ( iobuf, netdev, &ipv4_protocol, ll_dest, + netdev->ll_addr ) ) != 0 ) { DBG ( "IPv4 could not transmit packet via %s: %s\n", netdev->name, strerror ( rc ) ); return rc; @@ -373,12 +374,15 @@ static int ipv4_tx ( struct io_buffer *iobuf, * * @v iobuf I/O buffer * @v netdev Network device + * @v ll_dest Link-layer destination address * @v ll_source Link-layer destination source * * This function expects an IP4 network datagram. It processes the headers * and sends it to the transport layer. */ -static int ipv4_rx ( struct io_buffer *iobuf, struct net_device *netdev __unused, +static int ipv4_rx ( struct io_buffer *iobuf, + struct net_device *netdev __unused, + const void *ll_dest __unused, const void *ll_source __unused ) { struct iphdr *iphdr = iobuf->data; size_t hdrlen; -- cgit v1.2.3-55-g7522