mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 18:11:49 +03:00
[ipoib] Simplify test for received broadcast packets
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -671,10 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
|
|||||||
ethhdr->h_protocol = net_proto;
|
ethhdr->h_protocol = net_proto;
|
||||||
|
|
||||||
/* Construct destination address */
|
/* Construct destination address */
|
||||||
if ( dest->gid_present &&
|
if ( IB_LID_MULTICAST ( dest->lid ) ) {
|
||||||
( memcmp ( &dest->gid, &ipoib->broadcast.mac.gid,
|
/* Multicast LID; use the Ethernet broadcast address */
|
||||||
sizeof ( dest->gid ) ) == 0 ) ) {
|
|
||||||
/* Broadcast GID; use the Ethernet broadcast address */
|
|
||||||
memcpy ( ðhdr->h_dest, eth_broadcast,
|
memcpy ( ðhdr->h_dest, eth_broadcast,
|
||||||
sizeof ( ethhdr->h_dest ) );
|
sizeof ( ethhdr->h_dest ) );
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user