summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/drivers/net/ipoib.c4
-rw-r--r--src/include/ipxe/ib_packet.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index b52ccb19..4b85eda3 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -671,8 +671,8 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
ethhdr->h_protocol = net_proto;
/* Construct destination address */
- if ( IB_LID_MULTICAST ( dest->lid ) ) {
- /* Multicast LID; use the Ethernet broadcast address */
+ if ( dest->gid_present && IB_GID_MULTICAST ( &dest->gid ) ) {
+ /* Multicast GID: use the Ethernet broadcast address */
memcpy ( &ethhdr->h_dest, eth_broadcast,
sizeof ( ethhdr->h_dest ) );
} else {
diff --git a/src/include/ipxe/ib_packet.h b/src/include/ipxe/ib_packet.h
index 2cea016b..747f9639 100644
--- a/src/include/ipxe/ib_packet.h
+++ b/src/include/ipxe/ib_packet.h
@@ -48,6 +48,9 @@ union ib_gid {
#define IB_GID_ARGS( gid ) \
IB_GUID_ARGS ( &(gid)->s.prefix ), IB_GUID_ARGS ( &(gid)->s.guid )
+/** Test for multicast GID */
+#define IB_GID_MULTICAST( gid ) ( (gid)->bytes[0] == 0xff )
+
/** An Infiniband Local Route Header */
struct ib_local_route_header {
/** Virtual lane and link version */