]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: don't add --mac-addr option to passt commandline
authorLaine Stump <laine@redhat.com>
Thu, 13 Jul 2023 15:51:28 +0000 (11:51 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 2 Aug 2023 23:33:02 +0000 (19:33 -0400)
commita8262cb331db0f1a706edbadffc2cd5b01e44be6
tree49ef64d0a314f50a0c85215a79f643c228b1095a
parent99349ba18e726465215a71f28d2146a0a2adb65d
qemu: don't add --mac-addr option to passt commandline

When I implemented passt support in libvirt, I saw the --mac-addr
option on the passt commandline, immediately assumed that this was
used for setting the guest interface's mac address somewhere within
passt, and read no further. As a result, "--mac-addr" is always added
to the passt commandline, specifying the setting from <mac
addr='blah'/> in the guest's interface config.

But as pointed out in this bugzilla comment:

https://bugzilla.redhat.com/2184967#c8

That is *not at all* what passt's --mac-addr option does. Instead, it
is used to force the *remote* mac address for incoming traffic to a
specific value. So setting --mac-addr results in all traffic on the
interface having the same (the guest's) mac address for both source
and destination in all traffic. Surprisingly, this still works, so
nobody noticed it during testing.

The proper thing is to not specify any mac address to passt - the
remote MAC addresses can and should remain untouched, and the local
MAC address will end up being known to passt just by the guest sending
out packets with that MAC address.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
src/qemu/qemu_passt.c