flow_dissector: fix byteorder of dissected ICMP ID
authorAlexander Lobakin <alobakin@pm.me>
Fri, 12 Mar 2021 20:08:57 +0000 (20:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:31:58 +0000 (14:31 +0200)
commit33cc382c5830c7fbbc69625c3cb29b5fd0f808f2
tree77b5369aa6ee9d3aba0acc0bc2827c38102261db
parentfce6fb90218935f7319265459484b3762c80d0a8
flow_dissector: fix byteorder of dissected ICMP ID

[ Upstream commit a25f822285420486f5da434efc8d940d42a83bce ]

flow_dissector_key_icmp::id is of type u16 (CPU byteorder),
ICMP header has its ID field in network byteorder obviously.
Sparse says:

net/core/flow_dissector.c:178:43: warning: restricted __be16 degrades to integer

Convert ID value to CPU byteorder when storing it into
flow_dissector_key_icmp.

Fixes: 5dec597e5cd0 ("flow_dissector: extract more ICMP information")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/flow_dissector.c