From: Sandeep Penigalapati <[email protected]>
In ice_fdir_parse_pattern(), a flow item that specifies a 'last'
member (a range) is only allowed for IPV4 and IPV6_FRAG_EXT item
types. For other item types the code set an rte_flow error but did
not return, so parsing continued from an inconsistent state.
Add the missing return so an unsupported range aborts parsing.
Fixes: b7e8781de768 ("net/ice: support flow director for IP fragment packet")
Cc: [email protected]
Signed-off-by: Sandeep Penigalapati <[email protected]>
---
drivers/net/intel/ice/ice_fdir_filter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/intel/ice/ice_fdir_filter.c
b/drivers/net/intel/ice/ice_fdir_filter.c
index fc848a33db..d7ddd32f90 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -1929,6 +1929,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter
*ad,
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"Not support range");
+ return -rte_errno;
}
input_set = (tunnel_type && !is_outer) ?
--
2.27.0