From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Zhao Subject: [PATCH v1] net/ixgbe: add more check in n-tuple filter Date: Mon, 23 Jan 2017 11:32:20 +0800 Message-ID: <1485142340-49032-1-git-send-email-wei.zhao1@intel.com> Cc: zhao wei To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 851E94CC5 for ; Mon, 23 Jan 2017 04:37:21 +0100 (CET) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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