summaryrefslogtreecommitdiffstats
path: root/src/net/arp.c
diff options
context:
space:
mode:
authorMichael Brown2010-10-07 17:03:16 +0200
committerMichael Brown2010-10-07 20:15:04 +0200
commit88dd921e24af0893734d4e197d646cfc7732ed54 (patch)
tree8ecbe7ef1e5d84b2243894769a9ab1251d5c56de /src/net/arp.c
parent[int13] Fix typo in debug message (diff)
downloadipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.gz
ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.tar.xz
ipxe-88dd921e24af0893734d4e197d646cfc7732ed54.zip
[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/arp.c')
-rw-r--r--src/net/arp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/arp.c b/src/net/arp.c
index 714b471b..9b5fd220 100644
--- a/src/net/arp.c
+++ b/src/net/arp.c
@@ -155,8 +155,8 @@ int arp_resolve ( struct net_device *netdev, struct net_protocol *net_protocol,
dest_net_addr, net_protocol->net_addr_len );
/* Transmit ARP request */
- if ( ( rc = net_tx ( iobuf, netdev, &arp_protocol,
- netdev->ll_broadcast ) ) != 0 )
+ if ( ( rc = net_tx ( iobuf, netdev, &arp_protocol,
+ netdev->ll_broadcast, netdev->ll_addr ) ) != 0 )
return rc;
return -ENOENT;
@@ -195,6 +195,7 @@ static struct arp_net_protocol * arp_find_protocol ( uint16_t net_proto ) {
* details.
*/
static int arp_rx ( struct io_buffer *iobuf, struct net_device *netdev,
+ const void *ll_dest __unused,
const void *ll_source __unused ) {
struct arphdr *arphdr = iobuf->data;
struct arp_net_protocol *arp_net_protocol;
@@ -261,7 +262,7 @@ static int arp_rx ( struct io_buffer *iobuf, struct net_device *netdev,
/* Send reply */
net_tx ( iob_disown ( iobuf ), netdev, &arp_protocol,
- arp_target_ha ( arphdr ) );
+ arp_target_ha ( arphdr ), netdev->ll_addr );
done:
free_iob ( iobuf );