From: Pavel Hrdina Date: Fri, 20 Oct 2017 14:01:03 +0000 (+0200) Subject: conf: duplicate interface name instead of MAC provided to lookup the interface X-Git-Tag: v3.9.0-rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=727238de25230b28ebce6b3db940413113a2a7a8;p=thirdparty%2Flibvirt.git conf: duplicate interface name instead of MAC provided to lookup the interface Introduced by 6094d6ec7fc9ea3e28c18c880b76858f06a8b129. Found by running libvirt-perl tests. Reviewed-by: Andrea Bolognani Signed-off-by: Pavel Hrdina --- diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index a6814a6aee..21d76e7507 100644 --- a/src/conf/virinterfaceobj.c +++ b/src/conf/virinterfaceobj.c @@ -182,7 +182,7 @@ virInterfaceObjListFindByMACStringCb(void *payload, virObjectLock(obj); if (STRCASEEQ(obj->def->mac, data->matchStr)) { - if (VIR_STRDUP(data->macs[data->nmacs], data->matchStr) < 0) { + if (VIR_STRDUP(data->macs[data->nmacs], obj->def->name) < 0) { data->error = true; goto cleanup; }