nwfilter_driver: allow VIR_NWFILTER_BINDING_CREATE_VALIDATE flag

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Kristina Hanicova 2021-08-26 14:32:34 +02:00 committed by Ján Tomko
parent eabb73eba2
commit 39f835621a

View File

@ -737,7 +737,7 @@ nwfilterBindingCreateXML(virConnectPtr conn,
virNWFilterBindingObj *obj = NULL; virNWFilterBindingObj *obj = NULL;
virNWFilterBindingPtr ret = NULL; virNWFilterBindingPtr ret = NULL;
virCheckFlags(0, NULL); virCheckFlags(VIR_NWFILTER_BINDING_CREATE_VALIDATE, NULL);
if (!driver->privileged) { if (!driver->privileged) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
@ -745,7 +745,7 @@ nwfilterBindingCreateXML(virConnectPtr conn,
return NULL; return NULL;
} }
def = virNWFilterBindingDefParseString(xml, 0); def = virNWFilterBindingDefParseString(xml, flags);
if (!def) if (!def)
return NULL; return NULL;