naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0037-route-Fix-printing-of-locked-entries.patch

049c96
From 0ece33cb828aceea8a6451e3d070def591ea8ab3 Mon Sep 17 00:00:00 2001
049c96
From: Phil Sutter <psutter@redhat.com>
049c96
Date: Thu, 18 Feb 2016 14:19:36 +0100
049c96
Subject: [PATCH] route: Fix printing of locked entries
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1291832
049c96
Upstream Status: iproute2.git commit ed6b8652f7d54
049c96
049c96
commit ed6b8652f7d5470cac7fd763b4a47d07a3a0bfb6
049c96
Author: Phil Sutter <phil@nwl.cc>
049c96
Date:   Sat Dec 12 14:09:48 2015 +0100
049c96
049c96
    route: Fix printing of locked entries
049c96
049c96
    Commit 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1")
049c96
    accidentally reordered fprintf statements. This patch restores the
049c96
    original ordering.
049c96
049c96
    Fixes: 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1")
049c96
    Signed-off-by: Phil Sutter <phil@nwl.cc>
049c96
---
049c96
 ip/iproute.c | 5 +++--
049c96
 1 file changed, 3 insertions(+), 2 deletions(-)
049c96
049c96
diff --git a/ip/iproute.c b/ip/iproute.c
049c96
index d87a099..27e04a8 100644
049c96
--- a/ip/iproute.c
049c96
+++ b/ip/iproute.c
049c96
@@ -544,8 +544,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
049c96
 			if (mxrta[i] == NULL)
049c96
 				continue;
049c96
 
049c96
-			if (mxlock & (1<
049c96
-				fprintf(fp, " lock");
049c96
 			if (i != RTAX_CC_ALGO)
049c96
 				val = rta_getattr_u32(mxrta[i]);
049c96
 
049c96
@@ -557,6 +555,9 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
049c96
 			else
049c96
 				fprintf(fp, " metric %d", i);
049c96
 
049c96
+			if (mxlock & (1<
049c96
+				fprintf(fp, " lock");
049c96
+
049c96
 			switch (i) {
049c96
 			case RTAX_FEATURES:
049c96
 				print_rtax_features(fp, val);
049c96
-- 
049c96
1.8.3.1
049c96