]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ipoib] Simplify test for received broadcast packets
authorMichael Brown <mcb30@ipxe.org>
Tue, 8 Mar 2016 10:11:19 +0000 (10:11 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 8 Mar 2016 12:23:30 +0000 (12:23 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ipoib.c

index d8c4efad58948c84eec929069dc13f2eba2fa754..66e72ac1ac4f5cdce2d546583bf3d1e263eb96ab 100644 (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 {