]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: duplicate interface name instead of MAC provided to lookup the interface
authorPavel Hrdina <phrdina@redhat.com>
Fri, 20 Oct 2017 14:01:03 +0000 (16:01 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 20 Oct 2017 14:28:38 +0000 (16:28 +0200)
Introduced by 6094d6ec7fc9ea3e28c18c880b76858f06a8b129.
Found by running libvirt-perl tests.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/virinterfaceobj.c

index a6814a6aee1c69c66f6ddbfa83b0bd149c4c3e31..21d76e750790b5de069a831a209b7cc948f5b01b 100644 (file)
@@ -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;
         }