Add more check on the mask of src_addr, dst_addr and next_proto_id in n-tuple filter rule pattern parser.If do not add such check, it maybe cause error in pattern parser.
Signed-off-by: zhao wei <wei.zh...@gmail.com> --- drivers/net/ixgbe/ixgbe_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 82aceed..8f78eee 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -331,7 +331,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr, ipv4_mask->hdr.packet_id || ipv4_mask->hdr.fragment_offset || ipv4_mask->hdr.time_to_live || - ipv4_mask->hdr.hdr_checksum) { + ipv4_mask->hdr.hdr_checksum || + !ipv4_mask->hdr.next_proto_id || + !ipv4_mask->hdr.dst_addr || + !ipv4_mask->hdr.src_addr ||) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, "Not supported by ntuple filter"); -- 2.5.5