Blame SOURCES/libvirt-util-make-forgotten-changes-suggested-during-review-of-commit-d40b820c.patch

9c6c51
From dc8506596662fcf2a9aa7942cb1ee081984a23d1 Mon Sep 17 00:00:00 2001
9c6c51
Message-Id: <dc8506596662fcf2a9aa7942cb1ee081984a23d1@dist-git>
9c6c51
From: Laine Stump <laine@laine.org>
9c6c51
Date: Mon, 14 Jan 2019 11:35:06 -0500
9c6c51
Subject: [PATCH] util: make forgotten changes suggested during review of
9c6c51
 commit d40b820c
9c6c51
MIME-Version: 1.0
9c6c51
Content-Type: text/plain; charset=UTF-8
9c6c51
Content-Transfer-Encoding: 8bit
9c6c51
9c6c51
I had intended to make these changes to commit d40b820c before
9c6c51
pushing, but forgot about it during the day between the initial review
9c6c51
and ACK.
9c6c51
9c6c51
Neither change is significant - just returning immediately when
9c6c51
virNetDevGetName() fails (instead of logging a debug message first)
9c6c51
and eliminating a comment that adds to confusion rather than
9c6c51
eliminating it. Still, the changes should be made to be more
9c6c51
consistent with nearly identical code just a few lines up (added in
9c6c51
commit 7282f455)
9c6c51
9c6c51
Signed-off-by: Laine Stump <laine@laine.org>
9c6c51
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9c6c51
(cherry picked from commit 85f223a8f2480ad446251639a078bb9420072506)
9c6c51
9c6c51
https://bugzilla.redhat.com/1583131
9c6c51
9c6c51
Conflicts: src/util/virnetdevip.c - more context conflicts
9c6c51
Signed-off-by: Laine Stump <laine@laine.org>
9c6c51
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
9c6c51
---
9c6c51
 src/util/virnetdevip.c | 12 ++++++------
9c6c51
 1 file changed, 6 insertions(+), 6 deletions(-)
9c6c51
9c6c51
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
9c6c51
index fff41ec498..6400887666 100644
9c6c51
--- a/src/util/virnetdevip.c
9c6c51
+++ b/src/util/virnetdevip.c
9c6c51
@@ -619,18 +619,18 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp,
9c6c51
 
9c6c51
             ifname = virNetDevGetName(nh->rtnh_ifindex);
9c6c51
 
9c6c51
-            if (ifname)
9c6c51
-                accept_ra = virNetDevIPGetAcceptRA(ifname);
9c6c51
+            if (!ifname)
9c6c51
+               goto error;
9c6c51
+
9c6c51
+            accept_ra = virNetDevIPGetAcceptRA(ifname);
9c6c51
 
9c6c51
             VIR_DEBUG("Checking multipath route nexthop device %s (%d), accept_ra: %d",
9c6c51
                       ifname, nh->rtnh_ifindex, accept_ra);
9c6c51
 
9c6c51
-            if (!ifname ||
9c6c51
-                (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)) {
9c6c51
+            if (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
9c6c51
                 goto error;
9c6c51
-            }
9c6c51
 
9c6c51
-            VIR_FREE(ifname); /* in case it wasn't added to the array */
9c6c51
+            VIR_FREE(ifname);
9c6c51
             data->hasRARoutes = true;
9c6c51
 
9c6c51
             len -= NLMSG_ALIGN(nh->rtnh_len);
9c6c51
-- 
9c6c51
2.20.1
9c6c51