]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv6/route.c
ipv6 route: Fix lifetime in netlink.
[net-next-2.6.git] / net / ipv6 / route.c
index 98aa50c11dd64fa4c0c29ec20c2de7f240ed0740..b45a7c0268c5625dfba21fd7727c48429d1f4fc8 100644 (file)
@@ -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;