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 <kubax.kozak@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
}
/* 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)