From: Kuba Kozak Date: Thu, 27 Jul 2017 07:28:22 +0000 (+0200) Subject: net/i40e: fix parsing QinQ pattern X-Git-Tag: spdx-start~2299 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c2be7f9b232fd6730dcec83555af050941c7805f;p=dpdk.git net/i40e: fix parsing QinQ pattern Add check if o_vlan_mask and i_vlan_mask are not a NULL pointer. Coverity issue: 143448 Coverity issue: 143449 Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern") Cc: stable@dpdk.org Signed-off-by: Kuba Kozak Acked-by: Jingjing Wu --- diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 95af7013c2..b92719a3b1 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -3719,8 +3719,10 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev, } /* Get filter specification */ - if ((o_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK)) && - (i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) { + if ((o_vlan_mask != NULL) && (o_vlan_mask->tci == + rte_cpu_to_be_16(I40E_TCI_MASK)) && + (i_vlan_mask != NULL) && + (i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) { filter->outer_vlan = rte_be_to_cpu_16(o_vlan_spec->tci) & I40E_TCI_MASK; filter->inner_vlan = rte_be_to_cpu_16(i_vlan_spec->tci)