Stephen Hemminger wrote:
> On Tue, 24 Jul 2007 09:50:57 +0530
> Varun Chandramohan <[EMAIL PROTECTED]> wrote:
>
>
>> Stephen Hemminger wrote:
>>
>>> On Mon, 23 Jul 2007 10:13:18 +0530
>>> Varun Chandramohan <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
The age field of the ipv6 rout
On Tue, 24 Jul 2007 09:50:57 +0530
Varun Chandramohan <[EMAIL PROTECTED]> wrote:
> Stephen Hemminger wrote:
> > On Mon, 23 Jul 2007 10:13:18 +0530
> > Varun Chandramohan <[EMAIL PROTECTED]> wrote:
> >
> >
> >> The age field of the ipv6 route structures are initilized with the current
> >> time
Stephen Hemminger wrote:
> On Mon, 23 Jul 2007 10:13:18 +0530
> Varun Chandramohan <[EMAIL PROTECTED]> wrote:
>
>
>> The age field of the ipv6 route structures are initilized with the current
>> timeval at the time of route creation. When the route dump is called
>> the route age value s
On Mon, 23 Jul 2007 10:13:18 +0530
Varun Chandramohan <[EMAIL PROTECTED]> wrote:
> The age field of the ipv6 route structures are initilized with the current
> timeval at the time of route creation. When the route dump is called
> the route age value stored in the structure is subtracted f
> + if (dumpflg)
> + NLA_PUT_U32(skb, RTA_AGE, timeval_to_sec(&tv) - rt->rt6i_age);
> + else
> + NLA_PUT_U32(skb, RTA_AGE, rt->rt6i_age);
Makes more sense (and easy to understand) if you use :
if (dumpflg == RT6_GET_ROUTE_INFO)
...
so that your code does not break if someone c
The age field of the ipv6 route structures are initilized with the current
timeval at the time of route creation. When the route dump is called the
route age value stored in the structure is subtracted from the present
timeval and the difference is passed on as the route age.
Signed-o