i40e: fix flow director packet filter programming

[ Upstream commit c672297bbc ]

Initialize to zero structures to build a valid
Tx Packet used for the filter programming.

Fixes: a9219b332f ("i40e: VLAN field for flow director")
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Radoslaw Tyl 2023-03-13 15:07:33 +01:00 committed by Greg Kroah-Hartman
parent 7a29799fc1
commit 9b2e910523

View File

@ -170,10 +170,10 @@ static char *i40e_create_dummy_packet(u8 *dummy_packet, bool ipv4, u8 l4proto,
struct i40e_fdir_filter *data)
{
bool is_vlan = !!data->vlan_tag;
struct vlan_hdr vlan;
struct ipv6hdr ipv6;
struct ethhdr eth;
struct iphdr ip;
struct vlan_hdr vlan = {};
struct ipv6hdr ipv6 = {};
struct ethhdr eth = {};
struct iphdr ip = {};
u8 *tmp;
if (ipv4) {