From: Daniel P. Berrange Date: Mon, 13 May 2013 16:32:55 +0000 (+0100) Subject: Don't overwrite useful message when creating macvlan fails X-Git-Tag: CVE-2013-1962~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3407e3b3a2a58a7eb54100cff9100e2f932873b1;p=thirdparty%2Flibvirt.git Don't overwrite useful message when creating macvlan fails Currently we report a bogus error message when macvlan creation fails: error: Failed to start domain migtest error: operation failed: Unable to create macvlan device With this removed, we see the real error: error: Failed to start domain migtest error: Unable to get index for interface p31p1: No such device Signed-off-by: Daniel P. Berrange --- diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 0c4fcbdd79..5316520022 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -897,11 +897,8 @@ create_name: } virMutexUnlock(&virNetDevMacVLanCreateMutex); - if (!cr_ifname) { - virReportError(VIR_ERR_OPERATION_FAILED, "%s", - _("Unable to create macvlan device")); + if (!cr_ifname) return -1; - } } if (virNetDevVPortProfileAssociate(cr_ifname,