diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-04-29 14:18:17 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-04-29 14:18:17 +0000 |
commit | ace1f6a61b6842e2b49ec7a08f368a2d9f433be0 (patch) | |
tree | 92c62e1bf75ff98d949b8f71a0f79c948d1e544a /src/cache_lifetime.c | |
parent | 96213d5f0821aee2fe52459ab2cd54569e50cf85 (diff) | |
download | conntrack-tools-ace1f6a61b6842e2b49ec7a08f368a2d9f433be0.tar.gz conntrack-tools-ace1f6a61b6842e2b49ec7a08f368a2d9f433be0.zip |
Fix reorder possible reordering of destroy messages under message omission. This patch introduces the TimeoutDestroy clause to determine how long a conntrack remains in the internal cache once it has been destroy from the kernel table.
Diffstat (limited to 'src/cache_lifetime.c')
-rw-r--r-- | src/cache_lifetime.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cache_lifetime.c b/src/cache_lifetime.c index ad3416a..cf84d20 100644 --- a/src/cache_lifetime.c +++ b/src/cache_lifetime.c @@ -53,7 +53,13 @@ static int lifetime_dump(struct us_conntrack *u, gettimeofday(&tv, NULL); - return sprintf(buf, " [active since %lds]", tv.tv_sec - *lifetime); + if (alarm_pending(&u->alarm)) + return sprintf(buf, " [active since %lds] [expires in %lds]", + tv.tv_sec - *lifetime, + u->alarm.tv.tv_sec - tv.tv_sec); + else + return sprintf(buf, " [active since %lds]", + tv.tv_sec - *lifetime); } struct cache_feature lifetime_feature = { |