mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Do not allow changing the UUID of a nwfilter
https://bugzilla.redhat.com/show_bug.cgi?id=1077009
This commit is contained in:
parent
ba8c83614a
commit
46a811db07
@ -3058,6 +3058,17 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
|
||||
return NULL;
|
||||
}
|
||||
virNWFilterObjUnlock(nwfilter);
|
||||
} else {
|
||||
nwfilter = virNWFilterObjFindByName(nwfilters, def->name);
|
||||
if (nwfilter) {
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
virUUIDFormat(nwfilter->def->uuid, uuidstr);
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
_("filter '%s' already exists with uuid %s"),
|
||||
def->name, uuidstr);
|
||||
virNWFilterObjUnlock(nwfilter);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (virNWFilterDefLoopDetect(nwfilters, def) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user