IB/core: Fix endianness annotation in rdma_is_multicast_addr()

[ Upstream commit 1c3aea2bc8 ]

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

Fixes: commit be1d325a33 ("IB/core: Set RoCEv2 MGID according to spec")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Bart Van Assche 2017-10-11 10:48:43 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель f7af60377e
Коммит 9fc290e529
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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));
}