4a73c86ff6
When set the GRE item, GRE key should follow after GRE header, or the header gre_item pointer used by the key will be invalid. Currently in the mlx5_flow_validate_item_gre_key() function, the header gre_item pointer is access before checking if the key is after the header or not. Once the key item is before the header, invalid gre_item pointer access happens. Move the gre_item pointer access after the GRE header check to avoid the crash issue. Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits") Cc: stable@dpdk.org Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Ori Kam <orika@mellanox.com>