Message ID | 1334071226-17865-1-git-send-email-jorge@dti2.net |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Tue, 10 Apr 2012 17:20:26 +0200 "Jorge Boncompte [DTI2]" <jorge@dti2.net> wrote: > From: "Jorge Boncompte [DTI2]" <jorge@dti2.net> > > Avoids showing negative metrics. > > Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> > --- > ip/iproute.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/ip/iproute.c b/ip/iproute.c > index c97f979..2d15c01 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) Applied -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/ip/iproute.c b/ip/iproute.c index c97f979..2d15c01 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)