aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2012-04-10 08:23:59 -0700
committerStephen Hemminger <shemminger@vyatta.com>2012-04-10 08:23:59 -0700
commit49b730d7b237a3c0b2361e77877228199f32cf9c (patch)
treeca674b2c51cbad0e4391ab6c0c7f0a7ed7f229f0
parent4ccfb44dfbe4bf34130cf601a2a59152f4eec816 (diff)
downloadplatform_external_iproute2-49b730d7b237a3c0b2361e77877228199f32cf9c.tar.gz
platform_external_iproute2-49b730d7b237a3c0b2361e77877228199f32cf9c.tar.bz2
platform_external_iproute2-49b730d7b237a3c0b2361e77877228199f32cf9c.zip
iproute: show metrics as an unsigned value
Avoids showing negative metrics. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
-rw-r--r--ip/iproute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ip/iproute.c b/ip/iproute.c
index c97f9794..2d15c019 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -404,7 +404,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
abuf, sizeof(abuf)));
}
if (tb[RTA_PRIORITY])
- fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
+ fprintf(fp, " metric %u ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
if (r->rtm_flags & RTNH_F_DEAD)
fprintf(fp, "dead ");
if (r->rtm_flags & RTNH_F_ONLINK)