summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-05-19 16:55:13 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-19 16:55:13 -0700
commit69cdf8f92a8dd191eee0e834c631d84a140b1121 (patch)
tree6c666f0512fa458472df1175d9254e26fd040403 /net/ipv6/route.c
parenta3264435b4ca1ccee54cbef2970f2ba4bef39e2d (diff)
downloadop-kernel-dev-69cdf8f92a8dd191eee0e834c631d84a140b1121.zip
op-kernel-dev-69cdf8f92a8dd191eee0e834c631d84a140b1121.tar.gz
ipv6 route: Fix lifetime in netlink.
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c4
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;
OpenPOWER on IntegriCloud