Commit ed6b8652 authored by Phil Sutter's avatar Phil Sutter Committed by Stephen Hemminger

route: Fix printing of locked entries

Commit 0f754332 ("route: ignore RTAX_HOPLIMIT of value -1")
accidentally reordered fprintf statements. This patch restores the
original ordering.

Fixes: 0f754332 ("route: ignore RTAX_HOPLIMIT of value -1")
Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
parent e834eb8e
...@@ -577,8 +577,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) ...@@ -577,8 +577,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (mxrta[i] == NULL) if (mxrta[i] == NULL)
continue; continue;
if (mxlock & (1<<i))
fprintf(fp, " lock");
if (i != RTAX_CC_ALGO) if (i != RTAX_CC_ALGO)
val = rta_getattr_u32(mxrta[i]); val = rta_getattr_u32(mxrta[i]);
...@@ -590,6 +588,9 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) ...@@ -590,6 +588,9 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
else else
fprintf(fp, " metric %d", i); fprintf(fp, " metric %d", i);
if (mxlock & (1<<i))
fprintf(fp, " lock");
switch (i) { switch (i) {
case RTAX_FEATURES: case RTAX_FEATURES:
print_rtax_features(fp, val); print_rtax_features(fp, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment