From: Jingjing Wu Date: Mon, 23 Jan 2017 09:42:44 +0000 (+0800) Subject: net/i40e: fix validation when deleting MAC address X-Git-Tag: spdx-start~4610 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ae9b07ec9354abdc71bc695e4baf9a13c871ff0b;p=dpdk.git net/i40e: fix validation when deleting MAC address When VF sends request to remove MAC address, PF host will check if it is a non-zero or unicast address. When VF remove a multicast address, it will report error. This patch fixes this issue. Fixes: ec852c94af39 ("net/i40e: enhance sanity check of MAC") Cc: stable@dpdk.org Signed-off-by: Jingjing Wu --- diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index dbea5d0336..0af0573d93 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -929,7 +929,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf, for (i = 0; i < addr_list->num_elements; i++) { mac = (struct ether_addr *)(addr_list->list[i].addr); - if(!is_valid_assigned_ether_addr(mac) || + if(is_zero_ether_addr(mac) || i40e_vsi_delete_mac(vf->vsi, mac)) { ret = I40E_ERR_INVALID_MAC_ADDR; goto send_msg;