mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
flow_dissector: fix byteorder of dissected ICMP ID
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: 5dec597e5c
("flow_dissector: extract more ICMP information")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
50535249f6
commit
a25f822285
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ void skb_flow_get_icmp_tci(const struct sk_buff *skb,
|
|||
* avoid confusion with packets without such field
|
||||
*/
|
||||
if (icmp_has_id(ih->type))
|
||||
key_icmp->id = ih->un.echo.id ? : 1;
|
||||
key_icmp->id = ih->un.echo.id ? ntohs(ih->un.echo.id) : 1;
|
||||
else
|
||||
key_icmp->id = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue