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

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



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


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