iproute: show metrics as an unsigned value
Avoids showing negative metrics. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
This commit is contained in:
parent
4ccfb44dfb
commit
49b730d7b2
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue