From nobody Mon Feb 9 14:02:47 2026 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=1558355940; cv=none; d=zoho.com; s=zohoarc; b=SLjpmMAOc2UULRSYvBdZXMlk2nJU++b5W4uk1zWYp+zXvn9mY7wGQyKorCX9MQ6O4tCepPTISeBR9ztskNij5J8zI00bkT7G0lkpBWGYYqHJ+5s8edRDRHmJJsY1JnwkHejqT9g4NAbJxBe716E2JW6s0hviX21V0axF7nqBtfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558355940; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=BO5SZLg5XFxYszD02vMbiKi+CbmtnRZE+NrMFyX/2Js=; b=C2K/7dh+3c4dOjBkx8GdOvXId5gpaK7/ZHhvqH5wUqo6K8YJbiQ4eD6JVv/sV0dGqhmqmdbQXnAUH+oJ8LL3PNDjnxyTDuwH8pL8sQSG0PoeXVvtSxoiQKXOYEsBdS8JwNdPxFanKFrBpirRQIVPOZhNg0utKjiZnKtuHTRGmOI= 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 1558355940581871.8382059256431; Mon, 20 May 2019 05:39:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2057C30832E1; Mon, 20 May 2019 12:38:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB2B779800; Mon, 20 May 2019 12:38:52 +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 9BBB75B427; Mon, 20 May 2019 12:38:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4KCcBGK031930 for ; Mon, 20 May 2019 08:38:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 151625D704; Mon, 20 May 2019 12:38:11 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 931232FC58 for ; Mon, 20 May 2019 12:38:10 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 20 May 2019 14:38:00 +0200 Message-Id: <23882361009ee59b601423131aa0dd54e1ac7fb9.1558355839.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/6] networkStartNetworkVirtual: Dissolve 'err3' label in 'error' 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-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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Mon, 20 May 2019 12:38:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 88e49969b5..cd59039bdb 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2336,6 +2336,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr d= river, char *macMapFile =3D NULL; int tapfd =3D -1; bool dnsmasqStarted =3D false; + bool devOnline =3D false; =20 /* Check to see if any network IP collides with an existing route */ if (networkCheckRouteCollision(def) < 0) @@ -2430,6 +2431,8 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr d= river, if (virNetDevSetOnline(def->bridge, 1) < 0) goto err2; =20 + devOnline =3D true; + for (i =3D 0; i < def->nroutes; i++) { virSocketAddrPtr gateway =3D NULL; =20 @@ -2450,12 +2453,12 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr= driver, /* If forward.type !=3D NONE, turn on global IP forwarding */ if (def->forward.type !=3D VIR_NETWORK_FORWARD_NONE) { if (v6present && !virNetDevIPCheckIPv6Forwarding()) - goto err3; /* Precise error message already provided */ + goto error; /* Precise error message already provided */ =20 if (networkEnableIPForwarding(v4present, v6present) < 0) { virReportSystemError(errno, "%s", _("failed to enable IP forwarding")); - goto err3; + goto error; } } =20 @@ -2463,7 +2466,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr d= river, /* start dnsmasq if there are any IP addresses (v4 or v6) */ if ((v4present || v6present) && networkStartDhcpDaemon(driver, obj) < 0) - goto err3; + goto error; =20 dnsmasqStarted =3D true; =20 @@ -2505,10 +2508,8 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr = driver, virNetworkObjSetDnsmasqPid(obj, -1); } =20 - err3: - if (!save_err) - virErrorPreserveLast(&save_err); - ignore_value(virNetDevSetOnline(def->bridge, 0)); + if (devOnline) + ignore_value(virNetDevSetOnline(def->bridge, 0)); =20 err2: if (!save_err) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list