The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6055
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === When testing on mellanox cards, the mac_filtering feature wasn't working when no hwaddr address was specified. This was because LXD is supposed to set the VF interface's MAC on the parent's VF setting first before enabling spoof checking. However it was using the wrong volatile key. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From 60e5efab140e60dd5eac07697c6d2985c79f0579 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Fri, 9 Aug 2019 10:49:40 +0100 Subject: [PATCH] device/nic/sriov: Fixes mac_filtering when no hwaddr specified When testing on mellanox cards, the mac_filtering feature wasn't working when no hwaddr address was specified. This was because LXD is supposed to set the VF interface's MAC on the parent's VF setting first before enabling spoof checking. However it was using the wrong volatile key. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/device/nic_sriov.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/device/nic_sriov.go b/lxd/device/nic_sriov.go index 3a827c200b..57186751f2 100644 --- a/lxd/device/nic_sriov.go +++ b/lxd/device/nic_sriov.go @@ -333,7 +333,7 @@ func (d *nicSRIOV) setupSriovParent(vfDevice string, vfID int, volatile map[stri // If no MAC specified in config, use current VF interface MAC. mac := d.config["hwaddr"] if mac == "" { - mac = volatile["last_state.vf.hwaddr"] + mac = volatile["last_state.hwaddr"] } // Set MAC on VF (this combined with spoof checking prevents any other MAC being used).
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel