]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Use flow keys dissector to parse packets for ARFS
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Fri, 5 Jul 2019 14:59:28 +0000 (17:59 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 8 Aug 2019 20:01:18 +0000 (13:01 -0700)
commit5239bdcdbeb91a597da556c0eebeafdbfbbfc112
tree71dbdf65434f442f6bab180a550436d1e2b7e0ba
parente44b740d03eba831d23ae7cb67313ba962c22055
net/mlx5e: Use flow keys dissector to parse packets for ARFS

The current ARFS code relies on certain fields to be set in the SKB
(e.g. transport_header) and extracts IP addresses and ports by custom
code that parses the packet. The necessary SKB fields, however, are not
always set at that point, which leads to an out-of-bounds access. Use
skb_flow_dissect_flow_keys() to get the necessary information reliably,
fix the out-of-bounds access and reuse the code.

Fixes: 7de741f9f8f5 ("net/mlx5e: Add accelerated RFS support")
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c