summaryrefslogtreecommitdiff
path: root/src/cache_timer.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-08-01 12:50:28 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2008-08-01 12:50:28 +0200
commitff402549052eb4b98ac9404a2f273d78ce323c94 (patch)
tree11b3cf75e933d62abc0aca6fe35c3d361e52d3fd /src/cache_timer.c
parent9ad0b747e0a2f433192235fb04e4d291ce07b7e6 (diff)
downloadconntrack-tools-ff402549052eb4b98ac9404a2f273d78ce323c94.tar.gz
conntrack-tools-ff402549052eb4b98ac9404a2f273d78ce323c94.zip
fix: wrong use of timersub in cache_timer
Fix wrong output in the dump of the expire timer which was negative. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/cache_timer.c')
-rw-r--r--src/cache_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache_timer.c b/src/cache_timer.c
index 6619c2c..44482b7 100644
--- a/src/cache_timer.c
+++ b/src/cache_timer.c
@@ -64,7 +64,7 @@ static int timer_dump(struct us_conntrack *u, void *data, char *buf, int type)
return 0;
gettimeofday(&tv, NULL);
- timersub(&tv, &alarm->tv, &tmp);
+ timersub(&alarm->tv, &tv, &tmp);
return sprintf(buf, " [expires in %lds]", tmp.tv_sec);
}