diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0bf17a3cf085..9f80518aacbd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2027,7 +2027,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
2027 | { | 2027 | { |
2028 | struct rtmsg *rtm; | 2028 | struct rtmsg *rtm; |
2029 | struct nlmsghdr *nlh; | 2029 | struct nlmsghdr *nlh; |
2030 | struct rta_cacheinfo ci; | 2030 | long expires; |
2031 | u32 table; | 2031 | u32 table; |
2032 | 2032 | ||
2033 | if (prefix) { /* user wants prefix routes only */ | 2033 | if (prefix) { /* user wants prefix routes only */ |
@@ -2101,18 +2101,11 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
2101 | NLA_PUT_U32(skb, RTA_OIF, rt->rt6i_dev->ifindex); | 2101 | NLA_PUT_U32(skb, RTA_OIF, rt->rt6i_dev->ifindex); |
2102 | 2102 | ||
2103 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); | 2103 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); |
2104 | ci.rta_lastuse = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse); | 2104 | |
2105 | if (rt->rt6i_expires) | 2105 | expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0; |
2106 | ci.rta_expires = jiffies_to_clock_t(rt->rt6i_expires - jiffies); | 2106 | if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, |
2107 | else | 2107 | expires, rt->u.dst.error) < 0) |
2108 | ci.rta_expires = 0; | 2108 | goto nla_put_failure; |
2109 | ci.rta_used = rt->u.dst.__use; | ||
2110 | ci.rta_clntref = atomic_read(&rt->u.dst.__refcnt); | ||
2111 | ci.rta_error = rt->u.dst.error; | ||
2112 | ci.rta_id = 0; | ||
2113 | ci.rta_ts = 0; | ||
2114 | ci.rta_tsage = 0; | ||
2115 | NLA_PUT(skb, RTA_CACHEINFO, sizeof(ci), &ci); | ||
2116 | 2109 | ||
2117 | return nlmsg_end(skb, nlh); | 2110 | return nlmsg_end(skb, nlh); |
2118 | 2111 | ||