aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2015-12-12 14:09:48 +0100
committerStephen Hemminger <shemming@brocade.com>2015-12-17 17:07:07 -0800
commited6b8652f7d5470cac7fd763b4a47d07a3a0bfb6 (patch)
tree77c98a27947234738ac520e114a10fb39bffd5a1
parente834eb8ebaf7b0ceb504f3dc4adf5c99f38ee93c (diff)
downloadandroid_external_iproute2-ed6b8652f7d5470cac7fd763b4a47d07a3a0bfb6.tar.gz
android_external_iproute2-ed6b8652f7d5470cac7fd763b4a47d07a3a0bfb6.tar.bz2
android_external_iproute2-ed6b8652f7d5470cac7fd763b4a47d07a3a0bfb6.zip
route: Fix printing of locked entries
Commit 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1") accidentally reordered fprintf statements. This patch restores the original ordering. Fixes: 0f7543322c5fd ("route: ignore RTAX_HOPLIMIT of value -1") Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--ip/iproute.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ip/iproute.c b/ip/iproute.c
index c42ea0b..4d86a59 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -577,8 +577,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (mxrta[i] == NULL)
continue;
- if (mxlock & (1<<i))
- fprintf(fp, " lock");
if (i != RTAX_CC_ALGO)
val = rta_getattr_u32(mxrta[i]);
@@ -590,6 +588,9 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
else
fprintf(fp, " metric %d", i);
+ if (mxlock & (1<<i))
+ fprintf(fp, " lock");
+
switch (i) {
case RTAX_FEATURES:
print_rtax_features(fp, val);