From: Varun Chandramohan <[EMAIL PROTECTED]>
Date: Wed, 19 Sep 2007 09:24:34 +0530

> The age field is filled with the current time at the time of creation of the 
> route. When the routes are dumped
> then the age value stored in the route structure is subtracted from the 
> current time value and the difference is the age expressed in secs.
> 
> Signed-off-by: Varun Chandramohan <[EMAIL PROTECTED]>

This doesn't match what your code does:

> +     /* Note: The ideal place to fill up the time value for a newely created 
> route will be
> +     ** in fn_hash_insert(). But we are delaying the time insert procedure 
> to avoid calling
> +     ** do_gettimeofday() twice.
> +     */
> +     do_gettimeofday(&tv);
> +     if (!*age) {
> +             *age = timeval_to_sec(&tv);
> +             NLA_PUT_U32(skb, RTA_AGE, *age);
> +     } else {
> +             NLA_PUT_U32(skb, RTA_AGE, timeval_to_sec(&tv) - *age);
> +     }

In avoiding the age initialization at routing cache insertion time,
you make the value provided totally inaccurate and essentially
useless especially the very first time the value is asked for.

I really don't like these changes, they have had problems every step
of the way, and the above proves that we could essentially always
return an age value of zero and still be compliant with the standards.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to