From: Jorge Boncompte [DTI2] Date: Tue, 10 Apr 2012 15:23:59 +0000 (-0700) Subject: iproute: show metrics as an unsigned value X-Git-Tag: v3.4.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49b730d7b237a3c0b2361e77877228199f32cf9c;p=thirdparty%2Fiproute2.git iproute: show metrics as an unsigned value Avoids showing negative metrics. Signed-off-by: Jorge Boncompte [DTI2] --- 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)