[libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

Eric Blake eblake at redhat.com
Mon Mar 5 16:14:49 UTC 2012


On 03/05/2012 09:05 AM, Laine Stump wrote:
> This patch is in response to:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=798467
> 
> If a guest's tap device is created using the same MAC address the
> guest uses for its own network card (which connects to the tap
> device), the Linux kernel will log the following message and traffic
> will not pass:
> 
>  kernel: vnet9: received packet with own address as source address
> 
> This patch disallows MAC addresses with a first byte of 0xFE, but only in
> the case that the MAC address is used for a guest interface that's
> connected by way of a standard tap device. (In other words, the
> validation is done at runtime at the same place the MAC address is
> modified for the tap device, rather than when mac address is parsed,
> the idea being that it is then we know for sure the address will be
> problematic.)
> ---
>  src/util/virnetdevtap.c |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120305/494e139d/attachment-0001.sig>


More information about the libvir-list mailing list