Commit 49b730d7 authored by Jorge Boncompte [DTI2]'s avatar Jorge Boncompte [DTI2] Committed by Stephen Hemminger

iproute: show metrics as an unsigned value

Avoids showing negative metrics.
Signed-off-by: default avatarJorge Boncompte [DTI2] <jorge@dti2.net>
parent 4ccfb44d
......@@ -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)
......
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