diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-29 15:22:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-29 15:22:33 -0500 |
commit | 346f870b8a9aaf0847f7c7cffdbb447bb2f3853e (patch) | |
tree | fca645087c2dcae6be1f64181e5d703d4bbefcaa /net | |
parent | 95f56e7aa807e9eec241a5b70f0695b2514b5ad5 (diff) | |
download | linux-346f870b8a9aaf0847f7c7cffdbb447bb2f3853e.tar.gz linux-346f870b8a9aaf0847f7c7cffdbb447bb2f3853e.tar.bz2 linux-346f870b8a9aaf0847f7c7cffdbb447bb2f3853e.zip |
ipv6: Report TCP timetstamp info in cacheinfo just like ipv4 does.
I missed this while adding ipv6 support to inet_peer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/route.c | 11 |
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, int iif, int type, u32 pid, u32 seq, int prefix, int nowait, unsigned int flags) { + const struct inet_peer *peer; struct rtmsg *rtm; struct nlmsghdr *nlh; long expires; u32 table; struct neighbour *n; + u32 ts, tsage; if (prefix) { /* user wants prefix routes only */ if (!(rt->rt6i_flags & RTF_PREFIX_RT)) { @@ -2471,7 +2473,14 @@ static int rt6_fill_node(struct net *net, else expires = INT_MAX; - if (rtnl_put_cacheinfo(skb, &rt->dst, 0, 0, 0, + peer = rt->rt6i_peer; + ts = tsage = 0; + if (peer && peer->tcp_ts_stamp) { + ts = peer->tcp_ts; + tsage = get_seconds() - peer->tcp_ts_stamp; + } + + if (rtnl_put_cacheinfo(skb, &rt->dst, 0, ts, tsage, expires, rt->dst.error) < 0) goto nla_put_failure; |