diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-03-08 17:02:24 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-03-08 17:43:26 +0000 |
commit | b5aa51ac62bd36294e1f312d0ac1d742f28fe7b0 (patch) | |
tree | a032cabf893c63d02aed83d24e3d4969a254f1b7 /src/drivers | |
parent | 076d77264842d4cdefebf8cc3b19b3292608d43d (diff) | |
download | ipxe-b5aa51ac62bd36294e1f312d0ac1d742f28fe7b0.zip ipxe-b5aa51ac62bd36294e1f312d0ac1d742f28fe7b0.tar.gz ipxe-b5aa51ac62bd36294e1f312d0ac1d742f28fe7b0.tar.bz2 |
[ipoib] Resimplify test for received broadcast packets
Commit e62e52b ("[ipoib] Simplify test for received broadcast
packets") relies upon the multicast LID being present in the
destination address vector as passed to ipoib_complete_recv().
Unfortunately, this information is not present in many Infiniband
devices' completion queue entries.
Fix by testing instead for the presence of a multicast GID.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/net/ipoib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index b52ccb1..4b85eda 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 ( ðhdr->h_dest, eth_broadcast, sizeof ( ethhdr->h_dest ) ); } else { |