Commit 2ee7065f authored by Greg Rose's avatar Greg Rose Committed by Jeff Kirsher

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: default avatarGreg Rose <gregory.v.rose@intel.com>
Tested-by: default avatarGarrett, Robert <robertx.e.garrett@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 3ca8bc6d
...@@ -635,6 +635,12 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -635,6 +635,12 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
} }
break; break;
case IXGBE_VF_SET_MACVLAN: 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) >> index = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >>
IXGBE_VT_MSGINFO_SHIFT; IXGBE_VT_MSGINFO_SHIFT;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment