From 49b730d7b237a3c0b2361e77877228199f32cf9c Mon Sep 17 00:00:00 2001 From: "Jorge Boncompte [DTI2]" Date: Tue, 10 Apr 2012 08:23:59 -0700 Subject: [PATCH] iproute: show metrics as an unsigned value Avoids showing negative metrics. Signed-off-by: Jorge Boncompte [DTI2] --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index c97f97948..2d15c019a 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) -- 2.47.2