Commit 9fc290e5 authored by Bart Van Assche's avatar Bart Van Assche Committed by Greg Kroah-Hartman

IB/core: Fix endianness annotation in rdma_is_multicast_addr()


[ Upstream commit 1c3aea2b ]

Since ipv4_addr is a big endian 32-bit number, annotate it as such.

Fixes: commit be1d325a ("IB/core: Set RoCEv2 MGID according to spec")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7af6037
......@@ -306,12 +306,12 @@ static inline void rdma_get_ll_mac(struct in6_addr *addr, u8 *mac)
static inline int rdma_is_multicast_addr(struct in6_addr *addr)
{
u32 ipv4_addr;
__be32 ipv4_addr;
if (addr->s6_addr[0] == 0xff)
return 1;
memcpy(&ipv4_addr, addr->s6_addr + 12, 4);
ipv4_addr = addr->s6_addr32[3];
return (ipv6_addr_v4mapped(addr) && ipv4_is_multicast(ipv4_addr));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment