提交 1c3aea2b 编写于 作者: B Bart Van Assche 提交者: Doug Ledford

IB/core: Fix endianness annotation in rdma_is_multicast_addr()

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: NBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 166245dd
......@@ -305,12 +305,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册