From e62e52b2b9d09bee8e30f54fa225eb381813fc9a Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 8 Mar 2016 10:11:19 +0000 Subject: [PATCH] [ipoib] Simplify test for received broadcast packets Signed-off-by: Michael Brown --- src/drivers/net/ipoib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index d8c4efad5..66e72ac1a 100644 --- a/src/drivers/net/ipoib.c +++ b/src/drivers/net/ipoib.c @@ -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 ( ðhdr->h_dest, eth_broadcast, sizeof ( ethhdr->h_dest ) ); } else {