]> 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)
commit383db801cdc7d99ef50027e9343386c63acd75df
treed56ab33c889d5c3276af636ae6c6c4c8031fc526
parentfa5ddc6302fd9723285f90f9994318a7326e4468
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: d5324c3827ec ("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