mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
nwfilter_driver: allow VIR_NWFILTER_DEFINE_VALIDATE flag
Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1b0caedb72
commit
a59d196b5d
@ -536,7 +536,8 @@ nwfilterDefineXMLFlags(virConnectPtr conn,
|
|||||||
virNWFilterDef *objdef;
|
virNWFilterDef *objdef;
|
||||||
virNWFilterPtr nwfilter = NULL;
|
virNWFilterPtr nwfilter = NULL;
|
||||||
|
|
||||||
virCheckFlags(0, NULL);
|
virCheckFlags(VIR_NWFILTER_DEFINE_VALIDATE, NULL);
|
||||||
|
|
||||||
|
|
||||||
if (!driver->privileged) {
|
if (!driver->privileged) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
@ -547,7 +548,7 @@ nwfilterDefineXMLFlags(virConnectPtr conn,
|
|||||||
nwfilterDriverLock();
|
nwfilterDriverLock();
|
||||||
virNWFilterWriteLockFilterUpdates();
|
virNWFilterWriteLockFilterUpdates();
|
||||||
|
|
||||||
if (!(def = virNWFilterDefParseString(xml, 0)))
|
if (!(def = virNWFilterDefParseString(xml, flags)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virNWFilterDefineXMLFlagsEnsureACL(conn, def) < 0)
|
if (virNWFilterDefineXMLFlagsEnsureACL(conn, def) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user