linux-stable/drivers/net/ethernet/intel/i40e
Ivan Vecera ea2a1cfc3b i40e: Fix VF MAC filter removal
Commit 73d9629e1c ("i40e: Do not allow untrusted VF to remove
administratively set MAC") fixed an issue where untrusted VF was
allowed to remove its own MAC address although this was assigned
administratively from PF. Unfortunately the introduced check
is wrong because it causes that MAC filters for other MAC addresses
including multi-cast ones are not removed.

<snip>
	if (ether_addr_equal(addr, vf->default_lan_addr.addr) &&
	    i40e_can_vf_change_mac(vf))
		was_unimac_deleted = true;
	else
		continue;

	if (i40e_del_mac_filter(vsi, al->list[i].addr)) {
	...
</snip>

The else path with `continue` effectively skips any MAC filter
removal except one for primary MAC addr when VF is allowed to do so.
Fix the check condition so the `continue` is only done for primary
MAC address.

Fixes: 73d9629e1c ("i40e: Do not allow untrusted VF to remove administratively set MAC")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240329180638.211412-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-04-01 21:33:08 -07:00
..
Makefile i40e: Add initial devlink support 2023-10-15 14:33:41 +01:00
i40e.h i40e: Enforce software interrupt during busy-poll exit 2024-03-26 08:34:40 -07:00
i40e_adminq.c i40e: Remove queue tracking fields from i40e_adminq_ring 2023-11-27 09:31:34 -08:00
i40e_adminq.h i40e: Remove queue tracking fields from i40e_adminq_ring 2023-11-27 09:31:34 -08:00
i40e_adminq_cmd.h i40e: Include types.h to some headers 2024-01-18 09:52:52 -08:00
i40e_alloc.h i40e: Move memory allocation structures to i40e_alloc.h 2023-10-05 09:13:42 -07:00
i40e_client.c i40e: remove unnecessary qv_info ptr NULL checks 2024-03-06 09:32:58 -08:00
i40e_common.c i40e: field get conversion 2023-12-18 11:20:43 -08:00
i40e_dcb.c i40e: Fix wrong mask used during DCB config 2024-02-12 16:58:08 -08:00
i40e_dcb.h net: intel: fix old compiler regressions 2024-02-07 09:15:27 -08:00
i40e_dcb_nl.c i40e: Introduce and use macros for iterating VSIs and VEBs 2024-02-16 09:28:14 -08:00
i40e_ddp.c i40e: field get conversion 2023-12-18 11:20:43 -08:00
i40e_debug.h i40e: Initialize hardware capabilities at single place 2023-11-14 20:05:44 -08:00
i40e_debugfs.c i40e: Remove VEB recursion 2024-02-16 09:28:14 -08:00
i40e_devids.h
i40e_devlink.c i40e: Do not call devlink_port_type_clear() 2023-11-06 16:16:13 -08:00
i40e_devlink.h i40e: Add initial devlink support 2023-10-15 14:33:41 +01:00
i40e_diag.c i40e: remove i40e_status 2023-07-31 14:37:25 -07:00
i40e_diag.h i40e: Include types.h to some headers 2024-01-18 09:52:52 -08:00
i40e_ethtool.c net: intel: i40e/igc: Remove setting Autoneg in EEE capabilities 2024-02-28 12:18:04 +00:00
i40e_hmc.c i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_hmc.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_io.h i40e: Split i40e_osdep.h 2023-10-05 09:13:43 -07:00
i40e_lan_hmc.c i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_lan_hmc.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_main.c i40e: fix i40e_count_filters() to count only active/new filters 2024-03-26 08:56:06 -07:00
i40e_nvm.c i40e: field get conversion 2023-12-18 11:20:43 -08:00
i40e_prototype.h i40e: Fix firmware version comparison function 2024-03-05 09:49:59 -08:00
i40e_ptp.c i40e: field get conversion 2023-12-18 11:20:43 -08:00
i40e_register.h i40e: Enforce software interrupt during busy-poll exit 2024-03-26 08:34:40 -07:00
i40e_trace.h i40e: add xdp_buff to i40e_ring struct 2023-03-09 13:11:24 -08:00
i40e_txrx.c i40e: Enforce software interrupt during busy-poll exit 2024-03-26 08:34:40 -07:00
i40e_txrx.h i40e: Enforce software interrupt during busy-poll exit 2024-03-26 08:34:40 -07:00
i40e_txrx_common.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00
i40e_type.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-12-21 22:17:23 +01:00
i40e_virtchnl_pf.c i40e: Fix VF MAC filter removal 2024-04-01 21:33:08 -07:00
i40e_virtchnl_pf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
i40e_xsk.c intel: xsk: initialize skb_frag_t::bv_offset in ZC drivers 2024-01-24 16:24:07 -08:00
i40e_xsk.h i40e: Remove circular header dependencies and fix headers 2023-10-05 09:18:09 -07:00