Subject: Re: [PATCH] [IPROUTE]: A workaround to make larger rto_min printed correctly

From: Jarek Poplawski <[email-masked]>
Date: Thu, 20 Dec 2007 10:12:30 +0100

On 20-12-2007 04:31, Satoru SATOH wrote:
> "ip route show" does not print correct value when larger rto_min is
> set (e.g. 3sec).
> 
> This problem is because of overflow in print_route() and
> the patch below is a workaround fix for that.
> 
...
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -510,16 +510,16 @@ int print_route(const struct sockaddr_nl *who,
> struct nlmsghdr *n, void *arg)
>                                 fprintf(fp, " %u",
> *(unsigned*)RTA_DATA(mxrta[i]));
>                         else {
>                                 unsigned val = *(unsigned*)RTA_DATA(mxrta[i]);
> +                               unsigned hz1 = hz / 1000;
...
> +                               if (val >= hz1)
> +                                       fprintf(fp, " %ums", val/hz1);
...

Probably I miss something or my iproute sources are too old, but:
does this work with hz < 1000?

Regards,
Jarek P.