diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-10-07 16:03:16 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-10-07 19:15:04 +0100 |
commit | 88dd921e24af0893734d4e197d646cfc7732ed54 (patch) | |
tree | 8ecbe7ef1e5d84b2243894769a9ab1251d5c56de /src/net/ipv4.c | |
parent | d57d49942a9482880bc619c2e7607b2c2f3d36a4 (diff) | |
download | ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.zip ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.gz ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.bz2 |
[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>
Diffstat (limited to 'src/net/ipv4.c')
-rw-r--r-- | src/net/ipv4.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 5918bbe..f6a1e6e 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; |