The kernel now reports lastused as the time in hz since
we last saw any packets. So let's start tracking it
that way.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
c_oil->cc.oldpktcnt = c_oil->cc.pktcnt;
c_oil->cc.oldbytecnt = c_oil->cc.bytecnt;
c_oil->cc.oldwrong_if = c_oil->cc.wrong_if;
- c_oil->cc.oldlastused = c_oil->cc.lastused;
pim_zlookup_sg_statistics (c_oil);
if (ioctl (qpim_mroute_socket_fd, SIOCGETSGCNT, &sgreq))
struct channel_counts
{
unsigned long long lastused;
- unsigned long long oldlastused;
unsigned long pktcnt;
unsigned long oldpktcnt;
unsigned long bytecnt;
pim_mroute_update_counters (up->channel_oil);
if ((up->channel_oil->cc.oldpktcnt >= up->channel_oil->cc.pktcnt) &&
- (up->channel_oil->cc.oldlastused >= up->channel_oil->cc.lastused))
+ (up->channel_oil->cc.lastused/100 >= qpim_keep_alive_time))
{
pim_mroute_del (up->channel_oil);
THREAD_OFF (up->t_ka_timer);