Browse Source

[ipoib] Simplify test for received broadcast packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
e62e52b2b9
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/drivers/net/ipoib.c

+ 2
- 4
src/drivers/net/ipoib.c View File

671
 	ethhdr->h_protocol = net_proto;
671
 	ethhdr->h_protocol = net_proto;
672
 
672
 
673
 	/* Construct destination address */
673
 	/* Construct destination address */
674
-	if ( dest->gid_present &&
675
-	     ( memcmp ( &dest->gid, &ipoib->broadcast.mac.gid,
676
-			sizeof ( dest->gid ) ) == 0 ) ) {
677
-		/* Broadcast GID; use the Ethernet broadcast address */
674
+	if ( IB_LID_MULTICAST ( dest->lid ) ) {
675
+		/* Multicast LID; use the Ethernet broadcast address */
678
 		memcpy ( &ethhdr->h_dest, eth_broadcast,
676
 		memcpy ( &ethhdr->h_dest, eth_broadcast,
679
 			 sizeof ( ethhdr->h_dest ) );
677
 			 sizeof ( ethhdr->h_dest ) );
680
 	} else {
678
 	} else {

Loading…
Cancel
Save