david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[ipoib] Simplify test for received broadcast packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2016-03-08 10:11:19 +00:00
parent ffdf8ea757
commit e62e52b2b9
1 changed files with 2 additions and 4 deletions

View File

@ -671,10 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
ethhdr->h_protocol = net_proto;
/* Construct destination address */
if ( dest->gid_present &&
( memcmp ( &dest->gid, &ipoib->broadcast.mac.gid,
sizeof ( dest->gid ) ) == 0 ) ) {
/* Broadcast GID; use the Ethernet broadcast address */
if ( IB_LID_MULTICAST ( dest->lid ) ) {
/* Multicast LID; use the Ethernet broadcast address */
memcpy ( &ethhdr->h_dest, eth_broadcast,
sizeof ( ethhdr->h_dest ) );
} else {