提交 46a811db 编写于 作者: H Hu Jianwei 提交者: Ján Tomko

Do not allow changing the UUID of a nwfilter

https://bugzilla.redhat.com/show_bug.cgi?id=1077009
上级 ba8c8361
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册