Re: [PATCH] network: don't allow multiple portgroups with the same name in a network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/05/2015 12:29 PM, Laine Stump wrote:
> When defining and creating networks, we have been checking to make
> sure there is only a single "default" portgroup, but haven't verified
> that no two portgroups have the same name. We *do* check for multiple
> definitions when updating the portgroups in an existing network
> though.
> 
> This patch adds a check to networkValidate(), which is called when a
> network is defined or created, to disallow duplicate names. It would
> actually make sense to do this in the network XML parser (since it's
> not really "something that might make sense but isn't supported by
> this driver", but is instead "something that should never be
> allowed"), but doing that carries the danger of causing errors when
> rereading the config of existing networks when libvirtd is restarted
> after an upgrade, and that would result in networks disappearing from
> libvirt's list. (I'm thinking I should change the error to "XML_ERROR"
> instead of "UNSUPPORTED", even though that's not the type of error
> that networkValidate is intended for)
> 
> This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1115858
> ---
>  src/network/bridge_driver.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)

> +        for (j = i+1; j < def->nPortGroups; j++) {

Wonder why our syntax-checker didn't flag the lack of spaces around '+'?

ACK

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]