All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: yoann.juet@univ-nantes.fr
Cc: netfilter@vger.kernel.org
Subject: Re: Second failover failure with conntrackd - INVALID packets
Date: Mon, 09 Feb 2009 12:29:24 +0100	[thread overview]
Message-ID: <49901394.30504@netfilter.org> (raw)
In-Reply-To: <498C004A.20506@univ-nantes.fr>

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

Hi again Yoann,

Yoann Juet wrote:
> I'm still facing the same difficulties with conntrack-tools 0.9.10 and
> kernel 2.6.28.
> 
> Log on FW1 after the second failover:
> 
> Feb  6 09:55:46 FW-DSI-1-IRT kernel: [ 1352.601798] RULE -1 -- DENY
> IN=eth0 OUT=eth1 SRC=193.52.101.32 DST=172.18.244.10 LEN=255 TOS=0x00
> PREC=0x00 TTL=62 ID=8698 DF PROTO=TCP SPT=5222 DPT=34189 WINDOW=501
> RES=0x00 ACK PSH URGP=0
> 
> As you can see, this TCP connection is present:
> 
> root@fw1-irt:~# conntrack -L  |grep 34189
> conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown.
> tcp      6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32
> sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32
> dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146
> [ASSURED] mark=0 secmark=0 use=1

This is weird, look like some problem in your scripts or the commit is
not working in node fw1-irt. The packet counters of the entry above show
that this is the old entry which is stuck in the cache after the second
failover. This should be deleted when fw1-irt's script issues the commit
(conntrackd -c). Does the log file tells that the commit was successful?

The following attached patch adds more verbose output to tell you that
some old entries has been deleted. Just in case that you need more
information for troubleshooting.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

[-- Attachment #2: y --]
[-- Type: text/plain, Size: 1425 bytes --]

diff --git a/include/cache.h b/include/cache.h
index 371170d..4d2bbe8 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -82,6 +82,7 @@ struct cache {
 		uint32_t	upd_fail_enoent;
 
 		uint32_t	commit_ok;
+		uint32_t	commit_delete;
 		uint32_t	commit_fail;
 
 		uint32_t	flush;
diff --git a/src/cache_iterators.c b/src/cache_iterators.c
index e16a621..54613b9 100644
--- a/src/cache_iterators.c
+++ b/src/cache_iterators.c
@@ -134,6 +134,7 @@ retry:
 		if (errno == EEXIST && retry == 1) {
 			ret = nl_destroy_conntrack(tmp->h, ct);
 			if (ret == 0 || (ret == -1 && errno == ENOENT)) {
+				tmp->c->stats.commit_delete++;
 				if (retry) {
 					retry = 0;
 					goto retry;
@@ -179,6 +180,7 @@ void cache_commit(struct cache *c)
 {
 	unsigned int commit_ok = c->stats.commit_ok;
 	unsigned int commit_fail = c->stats.commit_fail;
+	unsigned int commit_delete = c->stats.commit_delete;
 	struct __commit_container tmp;
 	struct timeval commit_start, commit_stop, res;
 
@@ -199,6 +201,11 @@ void cache_commit(struct cache *c)
 	/* calculate new entries committed */
 	commit_ok = c->stats.commit_ok - commit_ok;
 	commit_fail = c->stats.commit_fail - commit_fail;
+	commit_delete = c->stats.commit_delete - commit_delete;
+
+	if (commit_delete)
+		dlog(LOG_NOTICE, "%u old entries deleted before "
+				 "commit", c->stats.commit_delete);
 
 	/* log results */
 	dlog(LOG_NOTICE, "Committed %u new entries", commit_ok);

  reply	other threads:[~2009-02-09 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 17:52 Second failover failure with conntrackd - INVALID packets Yoann Juet
2009-01-21 20:52 ` Pablo Neira Ayuso
2009-01-22  9:54   ` Yoann Juet
2009-01-22 16:55     ` Pablo Neira Ayuso
2009-01-23 12:39       ` Yoann Juet
2009-01-25 10:51         ` Pablo Neira Ayuso
2009-01-25 17:55           ` Pablo Neira Ayuso
2009-01-26 19:27             ` Yoann Juet
2009-01-26 23:01               ` Pablo Neira Ayuso
2009-01-29 16:10                 ` Yoann Juet
2009-02-03 10:10                   ` Pablo Neira Ayuso
2009-02-04 10:37                     ` Yoann Juet
2009-02-04 10:43                       ` Pablo Neira Ayuso
2009-02-06  9:18                         ` Yoann Juet
2009-02-09 11:29                           ` Pablo Neira Ayuso [this message]
2009-02-10 13:13                             ` Yoann Juet
2009-02-11  8:49                               ` Pablo Neira Ayuso
2009-02-13  8:21                                 ` Yoann Juet
2009-02-13 15:20                                   ` Pablo Neira Ayuso
     [not found]                                     ` <499B0696.2020300@netfilter.org>
2009-02-23 15:38                                       ` Yoann Juet
2009-02-23 20:40                                         ` Pablo Neira Ayuso
2009-02-24 12:03                                           ` Yoann Juet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49901394.30504@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=netfilter@vger.kernel.org \
    --cc=yoann.juet@univ-nantes.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.