From nobody Wed May 8 21:56:07 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547358159136422.7012385056403; Sat, 12 Jan 2019 21:42:39 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FF0E445C4; Sun, 13 Jan 2019 05:42:36 +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 B6C8A34841; Sun, 13 Jan 2019 05:42:33 +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 6746CC584; Sun, 13 Jan 2019 05:42:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0D5gRgd010521 for ; Sun, 13 Jan 2019 00:42:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 57560101F97D; Sun, 13 Jan 2019 05:42:27 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-181.phx2.redhat.com [10.3.117.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13D731048100 for ; Sun, 13 Jan 2019 05:42:24 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Sun, 13 Jan 2019 00:42:20 -0500 Message-Id: <20190113054220.14200-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] util: make forgotten changes suggested during review of commit d40b820c 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 13 Jan 2019 05:42:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" I had intended to make these changes to commit d40b820c before pushing, but forgot about it during the day between the initial review and ACK. Neither change is significant - just returning immediately when virNetDevGetName() faills (instead of logging a debug message first) and eliminating a comment that adds to confusion rather than eliminating it. Still, the changes should be made to be more consistent wit= h nearly identical code just a few lines up (added in commit 7282f455) Signed-off-by: Laine Stump Reviewed-by: J=C3=A1n Tomko --- src/util/virnetdevip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 8c960ceeac..b6df422cd1 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -584,18 +584,18 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghd= r *resp, =20 ifname =3D virNetDevGetName(nh->rtnh_ifindex); =20 - if (ifname) - accept_ra =3D virNetDevIPGetAcceptRA(ifname); + if (!ifname) + return -1; + + accept_ra =3D virNetDevIPGetAcceptRA(ifname); =20 VIR_DEBUG("Checking multipath route nexthop device %s (%d), ac= cept_ra: %d", ifname, nh->rtnh_ifindex, accept_ra); =20 - if (!ifname || - (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(d= ata, &ifname) < 0)) { + if (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(da= ta, &ifname) < 0) return -1; - } =20 - VIR_FREE(ifname); /* in case it wasn't added to the array */ + VIR_FREE(ifname); data->hasRARoutes =3D true; =20 len -=3D NLMSG_ALIGN(nh->rtnh_len); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list