Re: [PATCH 4/4] Initialize and fill IPv6 route age

2007-07-24 Thread Varun Chandramohan
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

Re: [PATCH 4/4] Initialize and fill IPv6 route age

2007-07-24 Thread Stephen Hemminger
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

Re: [PATCH 4/4] Initialize and fill IPv6 route age

2007-07-23 Thread Varun Chandramohan
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

Re: [PATCH 4/4] Initialize and fill IPv6 route age

2007-07-23 Thread Stephen Hemminger
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

Re: [PATCH 4/4] Initialize and fill IPv6 route age

2007-07-23 Thread Krishna Kumar2
> + 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

[PATCH 4/4] Initialize and fill IPv6 route age

2007-07-22 Thread Varun Chandramohan
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