[Libvirt-cim] [PATCH] Fix crash when creating ACL filter lists

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Thu Jul 21 17:35:43 UTC 2011


On 07/20/2011 06:35 PM, Chip Vincent wrote:
> # HG changeset patch
> # User Chip Vincent<cvincent at us.ibm.com>
> # Date 1311193039 14400
> # Node ID c4fae0f5cc8f21f0d66077df7693158c10633ece
> # Parent  6056961c3c5347d3b8375039767d7bc78fa97eb5
> Fix crash when creating ACL filter lists
>
> Specifically, AppliedFilterList and NestedFilterList CreateInstance().
>
> For AppliedFilterList:
> The Antecedent and Dependent were backwards and the provider would crash
> since no libvirt connection was made before calling get_filter_by_name().
> Also added some additional error checking in acl_parsing.c. It appears
> libvirt w/ qemu does not support dynamic updating of virtual net devices
> in 0.8.1 so CreateInstance() will still fail (but not crash) in that
> version. Looking for alternatives to provide dynamic support and will post
> in a follow-on patch.
>
> For NestedFilterList:
> The code was trying to extract the 'Name' property from the instance reference,
> rather than the Antecedent and Dependent properties. Also fixed an issue
> when creating the filter XML.
>

Looks good. With this patch I was able to successfully create a new 
filter with a filterref entry referring to another pre-existent filter. 
I was not able to create the AppliedFilterList instance though, i.e, 
associate a filter to a network interface of a given domain. Is there 
any restriction about that? If so, the patch is good to go and a proper 
fix where necessary can be provided by another patch.

Best regards,

-- 
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima at br.ibm.com




More information about the Libvirt-cim mailing list