]> git.baikalelectronics.ru Git - kernel.git/commit
ipmr, ip6mr: return lastuse relative to now
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 20 Sep 2016 14:17:22 +0000 (16:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Sep 2016 04:58:23 +0000 (00:58 -0400)
commita4a1c43967300e092e84645c4648fdabd11d1da2
treed56ab33c889d5c3276af636ae6c6c4c8031fc526
parent86cd7cf9b8372d96d9de1c68407123ea1050c2d0
ipmr, ip6mr: return lastuse relative to now

When I introduced the lastuse member I made a subtle error because it was
returned as an absolute value but that is meaningless to user-space as it
doesn't allow to see how old exactly an entry is. Let's make it similar to
how the bridge returns such values and make it relative to "now" (jiffies).
This allows us to show the actual age of the entries and is much more
useful (e.g. user-space daemons can age out entries, iproute2 can display
the lastuse properly).

Fixes: 5132b49c50dc ("net: ipmr/ip6mr: add support for keeping an entry age")
Reported-by: Satish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c
net/ipv6/ip6mr.c