Re: [libvirt] [PATCH] Prevent initializing ebtables if disabled in qemu.conf

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

 



On 11/10/2009 06:32 PM, Ryota Ozaki wrote:
> * src/qemu/qemu_conf.c: don't initialize ebtables if
>   disabled
> ---
>  src/qemu/qemu_conf.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 28567b2..5f492dd 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -322,7 +322,7 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
>  
>      p = virConfGetValue (conf, "mac_filter");
>      CHECK_TYPE ("mac_filter", VIR_CONF_LONG);
> -    if (p) {
> +    if (p && p->l) {
>          driver->macFilter = p->l;
>          if (!(driver->ebtables = ebtablesContextNew("qemu"))) {
>              driver->macFilter = 0;

ACK

Also, hijacking this patch a bit to point out a few small issues I noticed
with the ebtables code (cc-ing Gerhard)

The mac_filter value in qemu.conf isn't documented and isn't commented out by
default, unlike the other values in the conf file. I think it would be good to
match existing convention.

Even though we check for the ebtables binary in configure, we don't disable
the driver if the binary doesn't exist (like it didn't on my rawhide box).
This causes it to print lots of error messages on libvirtd startup. It would
be nice to find a way to just VIR_DEBUG that the binary wasn't found and skip
initializing the driver.

Thanks,
Cole

--
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]