Bläddra i källkod

[ipoib] Simplify test for received broadcast packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 år sedan
förälder
incheckning
e62e52b2b9
1 ändrade filer med 2 tillägg och 4 borttagningar
  1. 2
    4
      src/drivers/net/ipoib.c

+ 2
- 4
src/drivers/net/ipoib.c Visa fil

@@ -671,10 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
671 671
 	ethhdr->h_protocol = net_proto;
672 672
 
673 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 676
 		memcpy ( &ethhdr->h_dest, eth_broadcast,
679 677
 			 sizeof ( ethhdr->h_dest ) );
680 678
 	} else {

Laddar…
Avbryt
Spara