From nobody Wed Nov 27 04:39:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556029339; cv=none; d=zoho.com; s=zohoarc; b=oHmQ0kiPy0EaToWtnF3KL0whH4FHa8XtjeeW9e106+0UME4tSEQkj0oMs+s+1FRHu3/7iQRJcJ4LZFKsuLJ67vWZB3d4XdQhX7s9dA9++B2QQ+a7nq/od1fU01z2NKc3mTjWXnjwZWuZfyVs5wbGVgI5S71ow2PsUicNlR9ICPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556029339; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=O+iCISYNGmfQ6Vz0vTzUzW/iz+hvPA2XCykpkBhD8eY=; b=cvdk6RL3hNpM5AfTjqvjAmHiExxZVY4HaW1zRLiNMIyhZqW3I2qbIevEUZrgfZenPfzz7bskpeeBBMWCTqQv7lsXDyQES9dBw+pdMLiZ41ArUCEVuDnkENC4DkOV9PNZdrNWqUbIfaFsYnXhAlqsfAwzuPZ/67qrpXy5QvuuCDY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556029339498912.5524317534948; Tue, 23 Apr 2019 07:22:19 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE9EE30832E1; Tue, 23 Apr 2019 14:22:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF4425D6A9; Tue, 23 Apr 2019 14:22:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8A665181AC47; Tue, 23 Apr 2019 14:22:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3NEM2Mr011280 for ; Tue, 23 Apr 2019 10:22:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id F1F4F5DA2D; Tue, 23 Apr 2019 14:22:02 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A51F5D96F for ; Tue, 23 Apr 2019 14:21:57 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 23 Apr 2019 16:21:49 +0200 Message-Id: <0ebc3b37a766feaf7fc553e0ae8ed348c44215f5.1556029309.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] networkStartNetworkVirtual: Don't overwrite error in 'err5' X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 23 Apr 2019 14:22:18 +0000 (UTC) If there's an error when setting up QoS on a bridge the control jumps over to 'err5' label. Here, the virNetDevBandwidthClear() is called to clear out any partially set QoS. This function can also report an error which would overwrite the actual error that caused us jumping here. =F0=9F=A4=A6 Use virErrorPreserveLast() to preserve the original error. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index ce4f4890f1..77206b4584 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2493,6 +2493,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr d= river, return 0; =20 err5: + virErrorPreserveLast(&save_err); if (def->bandwidth) virNetDevBandwidthClear(def->bridge); =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list