On 8/20/21 1:57 PM, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> > --- > include/libvirt/libvirt-nwfilter.h | 4 ++++ > src/libvirt-nwfilter.c | 4 ++-- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/include/libvirt/libvirt-nwfilter.h b/include/libvirt/libvirt-nwfilter.h > index 041b1fc33b..9897df6df6 100644 > --- a/include/libvirt/libvirt-nwfilter.h > +++ b/include/libvirt/libvirt-nwfilter.h > @@ -80,6 +80,10 @@ virNWFilterPtr virNWFilterLookupByUUID (virConnectPtr conn, > virNWFilterPtr virNWFilterLookupByUUIDString (virConnectPtr conn, > const char *uuid); > > +typedef enum { > + VIR_NWFILTER_DEFINE_VALIDATE = 1 << 0, /* Validate the XML document against schema */ > +} virNWFilterDefineFlags; > + > /* > * Define persistent nwfilter > */ > diff --git a/src/libvirt-nwfilter.c b/src/libvirt-nwfilter.c > index c5c53327d3..ca4dddf89e 100644 > --- a/src/libvirt-nwfilter.c > +++ b/src/libvirt-nwfilter.c > @@ -410,7 +410,7 @@ virNWFilterDefineXML(virConnectPtr conn, const char *xmlDesc) > * virNWFilterDefineXMLFlags: > * @conn: pointer to the hypervisor connection > * @xmlDesc: an XML description of the nwfilter > - * @flags: extra flags; not used yet, so callers should always pass 0 > + * @flags: bitwise-OR of virNWFilterDefineFlags > * > * Define a new network filter, based on an XML description > * similar to the one returned by virNWFilterGetXMLDesc() > @@ -427,7 +427,7 @@ virNWFilterDefineXMLFlags(virConnectPtr conn, const char *xmlDesc, unsigned int > > virResetLastError(); > > - virCheckFlags(0, NULL); > + virCheckFlags(VIR_NWFILTER_DEFINE_VALIDATE, NULL); > > virCheckConnectReturn(conn, NULL); > virCheckNonNullArgGoto(xmlDesc, error); > This last hunk shouldn't be here as @flags shouldn't be checked for at client side. Michal