[libvirt] [PATCHv3 2/2] Give each virtual network bridge its own fixed MAC address
Eric Blake
eblake at redhat.com
Fri Feb 11 18:33:49 UTC 2011
On 02/11/2011 01:41 AM, Laine Stump wrote:
> Changes in V3 (based on eblake's review of V2):
>
> 1) fix typos in formatnetwork.html.in
>
> 2) update %post script in libvirt.spec.in per eblake's suggestions
>
> All other files are identical to V2
>
>
> docs/formatnetwork.html.in: document <mac address.../>
> docs/schemas/network.rng: add nac address to schema
> libvirt.spec.in: %post script to update existing networks
> src/conf/network_conf.[ch]: parse and format <mac address.../>
> src/libvirt_private.syms: export a couple private symbols we need
> src/network/bridge_driver.c:
> auto-generate mac address when needed,
> create dummy interface if mac address is present.
> tests/networkxml2xmlin/isolated-network.xml
> tests/networkxml2xmlin/routed-network.xml
> tests/networkxml2xmlout/isolated-network.xml
> tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
> + if test -f $dir/$file
> + then
> + sed -i.orig -e \
> + "s|\(<bridge.*$\)|\0\n <mac address='52:54:00:$mac4:$mac5:$mac6'/>|" \
> + $dir/$file
> + if test $? != 0
> + then
> + echo "failed to add <mac address='52:54:00:$mac4:$mac5:$mac6'/>" \
> + " to $dir/$file"
This message will have two spaces (echo has two arguments, so it
separates them with space; and the second argument has a leading space).
s/" /"/
ACK with that nit fixed; however, I'm not sure if this qualifies as a
bug fix for 0.8.8 or a feature for post-0.8.8. DV?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110211/82458138/attachment-0001.sig>
More information about the libvir-list
mailing list