]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tipc: convert dest node's address to network order
authorHoang Le <hoang.h.le@dektech.com.au>
Thu, 11 Mar 2021 03:33:22 +0000 (10:33 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:27 +0000 (10:29 +0200)
commitd0513cce80823078dd4078b26c77d2dba08d8b5f
tree8b48a2580efbc984cf50c1a7d50daa0eed6fcaf5
parentd6efc40a883ebdabeaa0b896c6487955c719f0c9
tipc: convert dest node's address to network order

[ Upstream commit 1980d37565061ab44bdc2f9e4da477d3b9752e81 ]

(struct tipc_link_info)->dest is in network order (__be32), so we must
convert the value to network order before assigning. The problem detected
by sparse:

net/tipc/netlink_compat.c:699:24: warning: incorrect type in assignment (different base types)
net/tipc/netlink_compat.c:699:24:    expected restricted __be32 [usertype] dest
net/tipc/netlink_compat.c:699:24:    got int

Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tipc/netlink_compat.c