Ivan Vecera ea2a1cfc3b i40e: Fix VF MAC filter removal
Commit 73d9629e1c8c ("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: 73d9629e1c8c ("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
..
2024-03-13 18:34:05 -07:00
2024-03-21 13:34:15 -07:00
2024-03-22 12:46:07 -07:00
2024-03-07 21:52:03 +00:00
2024-03-19 11:57:26 -07:00
2024-03-18 15:11:44 -07:00
2024-03-15 11:58:32 -07:00
2024-03-07 20:37:04 +00:00
2024-03-15 12:25:13 -07:00
2024-03-24 13:54:06 -07:00
2024-03-21 19:04:31 -07:00
2024-03-14 09:56:15 -07:00
2024-03-21 10:01:02 -07:00
2024-03-18 15:34:03 -07:00
2024-03-06 14:03:31 +00:00
2024-03-24 10:45:31 -07:00
2024-03-07 20:32:47 +00:00
2024-03-07 20:26:24 -08:00
2024-03-15 17:53:48 -07:00
2024-03-18 17:30:46 +00:00
2024-03-13 10:59:28 -07:00
2024-03-21 12:44:10 -07:00
2024-03-23 08:43:21 -07:00
2024-03-18 17:30:46 +00:00
2024-03-07 20:32:38 +00:00
2024-04-01 21:33:08 -07:00
2024-03-15 11:58:32 -07:00
2024-03-21 13:23:07 -06:00
2024-03-21 13:34:15 -07:00
2024-03-14 10:58:27 -07:00
2024-03-21 12:35:20 -07:00
2024-03-16 11:24:51 -07:00
2024-03-13 11:33:10 -07:00
2024-03-12 17:44:08 -07:00
2024-03-25 07:31:26 +01:00
2024-03-22 09:52:37 -07:00
2024-03-21 10:37:39 -07:00
2024-03-21 17:16:46 -07:00
2024-03-25 19:46:49 -07:00
2024-03-22 13:31:07 -07:00
2024-03-21 15:18:18 -07:00
2024-03-15 12:22:52 -07:00
2024-03-22 09:57:00 -07:00
2024-03-16 16:31:12 -07:00
2024-03-12 10:35:24 -07:00
2024-03-21 12:44:10 -07:00
2024-03-16 16:31:12 -07:00
2024-03-21 12:35:20 -07:00
2024-03-15 13:21:13 -07:00
2024-03-19 08:57:39 -07:00
2024-03-17 12:06:10 -07:00
2024-03-19 08:48:09 -07:00