netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6 2/4] [IPV6] ROUTE: Fix lifetime in netlink.
@ 2008-05-15  9:18 YOSHIFUJI Hideaki / 吉藤英明
  2008-05-19 23:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2008-05-15  9:18 UTC (permalink / raw)
  To: davem; +Cc: yoshfuji, netdev

We could not see appropriate lifetime if the route had been scheduled
to expired at 0 (in jiffies).  We should check rt6i_flags instead of
rt6i_expires to determine whether lifetime is valid or not.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
 net/ipv6/route.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 98aa50c..b45a7c0 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2200,7 +2200,9 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
 
 	NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric);
 
-	expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0;
+	expires = (rt->rt6i_flags & RTF_EXPIRES) ?
+			rt->rt6i_expires - jiffies : 0;
+
 	if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0,
 			       expires, rt->u.dst.error) < 0)
 		goto nla_put_failure;
-- 
1.4.4.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-2.6 2/4] [IPV6] ROUTE: Fix lifetime in netlink.
  2008-05-15  9:18 [PATCH net-2.6 2/4] [IPV6] ROUTE: Fix lifetime in netlink YOSHIFUJI Hideaki / 吉藤英明
@ 2008-05-19 23:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-05-19 23:55 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev

From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Thu, 15 May 2008 18:18:02 +0900 (JST)

> We could not see appropriate lifetime if the route had been scheduled
> to expired at 0 (in jiffies).  We should check rt6i_flags instead of
> rt6i_expires to determine whether lifetime is valid or not.
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-19 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15  9:18 [PATCH net-2.6 2/4] [IPV6] ROUTE: Fix lifetime in netlink YOSHIFUJI Hideaki / 吉藤英明
2008-05-19 23:55 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).