[conntrack-tools] fix: wrong use of timersub in cache_timer

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Fri Aug 1 12:50:37 CEST 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=ff402549052eb4b98ac9404a2f273d78ce323c94
commit ff402549052eb4b98ac9404a2f273d78ce323c94
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Fri Aug 1 12:50:28 2008 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Fri Aug 1 12:50:28 2008 +0200

    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 at netfilter.org>
       via  ff402549052eb4b98ac9404a2f273d78ce323c94 (commit)
      from  9ad0b747e0a2f433192235fb04e4d291ce07b7e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ff402549052eb4b98ac9404a2f273d78ce323c94
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Fri Aug 1 12:50:28 2008 +0200

    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 at netfilter.org>

-----------------------------------------------------------------------

 src/cache_timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Fix wrong output in the dump of the expire timer which was negative.

Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

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);
 }
 



More information about the netfilter-cvslog mailing list