]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virnetdev: Fix regression in setting VLAN tag
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Apr 2022 12:15:47 +0000 (14:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 5 May 2022 11:21:07 +0000 (13:21 +0200)
commitb399f2c00044394cd465a44e0f839f4abf2c4dc4
tree4c194eee69a3c5b6eff0aed6699dc2a118c65e64
parent7899a115237e0490e5c85c11b7a6d1d4007c7472
virnetdev: Fix regression in setting VLAN tag

In the past, we did set VLAN tag on <interface type='direct'/>.
However, during rewrite (v8.1.0-rc1~191) virNetDevSetVfConfig()
was changed and a condition that was responsible for calling
a function that sets VLAN tag was changed accidentally resulting
in VLAN tag not being set anymore.

However, because of other changes in the same patchset, it may
happen that @adminMac is NULL (this is to work around yet another
broken SRIOV driver), and thus we must refrain from setting MAC
and have to set VLAN tag only.

Fixes: 73961771a1cfec3c0f43caec9d117d2fbcc7af39
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075383
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virnetdev.c