From 2ee7065fdd7d3232e4accade2b5cace8af2c7d74 Mon Sep 17 00:00:00 2001 From: Greg Rose Date: Sat, 24 Mar 2012 00:26:44 +0000 Subject: [PATCH] ixgbe: Deny MACVLAN requests from VFs with admin set MAC If the host VMM administrator has set the virtual function device's MAC address then also deny VF requests for MACVLAN filters. Signed-off-by: Greg Rose Tested-by: Garrett, Robert Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index 88a58cb08569..39856371acb1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -635,6 +635,12 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) } break; case IXGBE_VF_SET_MACVLAN: + if (adapter->vfinfo[vf].pf_set_mac) { + e_warn(drv, "VF %d requested MACVLAN filter but is " + "administratively denied\n", vf); + retval = -1; + break; + } index = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> IXGBE_VT_MSGINFO_SHIFT; /* -- GitLab