aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/route.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 0940729d2f91..30de9e74a813 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2360,11 +2360,13 @@ static int rt6_fill_node(struct net *net,
2360 int iif, int type, u32 pid, u32 seq, 2360 int iif, int type, u32 pid, u32 seq,
2361 int prefix, int nowait, unsigned int flags) 2361 int prefix, int nowait, unsigned int flags)
2362{ 2362{
2363 const struct inet_peer *peer;
2363 struct rtmsg *rtm; 2364 struct rtmsg *rtm;
2364 struct nlmsghdr *nlh; 2365 struct nlmsghdr *nlh;
2365 long expires; 2366 long expires;
2366 u32 table; 2367 u32 table;
2367 struct neighbour *n; 2368 struct neighbour *n;
2369 u32 ts, tsage;
2368 2370
2369 if (prefix) { /* user wants prefix routes only */ 2371 if (prefix) { /* user wants prefix routes only */
2370 if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { 2372 if (!(rt->rt6i_flags & RTF_PREFIX_RT)) {
@@ -2471,7 +2473,14 @@ static int rt6_fill_node(struct net *net,
2471 else 2473 else
2472 expires = INT_MAX; 2474 expires = INT_MAX;
2473 2475
2474 if (rtnl_put_cacheinfo(skb, &rt->dst, 0, 0, 0, 2476 peer = rt->rt6i_peer;
2477 ts = tsage = 0;
2478 if (peer && peer->tcp_ts_stamp) {
2479 ts = peer->tcp_ts;
2480 tsage = get_seconds() - peer->tcp_ts_stamp;
2481 }
2482
2483 if (rtnl_put_cacheinfo(skb, &rt->dst, 0, ts, tsage,
2475 expires, rt->dst.error) < 0) 2484 expires, rt->dst.error) < 0)
2476 goto nla_put_failure; 2485 goto nla_put_failure;
2477 2486