diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 682ba745675750363aed1c3053c51134d94e1674..a553b516485d6b1746a8efa8f07e3b6217833796 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2399,6 +2399,20 @@ virNWFilterPoolObjAssignDef(virConnectPtr conn, { virNWFilterPoolObjPtr pool; + pool = virNWFilterPoolObjFindByUUID(pools, def->uuid); + + if (pool) { + if (!STREQ(def->name, pool->def->name)) { + virNWFilterReportError(VIR_ERR_INVALID_NWFILTER, + _("filter with same UUID but different name " + "('%s') already exists"), + pool->def->name); + virNWFilterPoolObjUnlock(pool); + return NULL; + } + virNWFilterPoolObjUnlock(pool); + } + if (virNWFilterDefLoopDetect(conn, pools, def)) { virNWFilterReportError(VIR_ERR_INVALID_NWFILTER, "%s", _("filter would introduce a loop"));