]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: forbid use of multicast mac addresses
authorLaine Stump <laine@laine.org>
Mon, 19 Mar 2012 16:49:17 +0000 (12:49 -0400)
committerLaine Stump <laine@laine.org>
Tue, 20 Mar 2012 00:33:30 +0000 (20:33 -0400)
commit0007237301586aa90f58a7cc8d7cb29a16b00470
treee7d69b284d6697df560a04f207b48a3474a33c55
parent43d635caf30988b28f1367b97041fc2f28eabec4
conf: forbid use of multicast mac addresses

A few times libvirt users manually setting mac addresses have
complained of a networking failure that ends up being due to a multicast
mac address being used for a guest interface. This patch prevents that
by logging an error and failing if a multicast mac address is
encountered in each of the three following cases:

1) domain xml <interface> mac address.
2) network xml bridge mac address.
3) network xml dhcp/host mac address.

There are several other places where a mac address can be input that
aren't controlled in this manner because failure to do so has no
consequences (e.g., if the address will be used to search through
existing interfaces for a match).

The RNG has been updated to add multiMacAddr and uniMacAddr along with
the existing macAddr, and macAddr was switched to uniMacAddr where
appropriate.
docs/schemas/basictypes.rng
docs/schemas/domaincommon.rng
docs/schemas/network.rng
src/conf/domain_conf.c
src/conf/network_conf.c
src/libvirt_private.syms
src/util/virmacaddr.c
src/util/virmacaddr.h