diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-02-15 01:51:11 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-02-15 01:51:11 +0100 |
commit | c2acb11453fc75519862240298e106ac79274780 (patch) | |
tree | e5c9c645a9ea86c8316fa502ae907c03c0e8d9fc /src/external_cache.c | |
parent | 98756c2608f0879a2322919c7441973216565272 (diff) | |
download | conntrack-tools-c2acb11453fc75519862240298e106ac79274780.tar.gz conntrack-tools-c2acb11453fc75519862240298e106ac79274780.zip |
cache: log if we received a commit request while already one in progress
This patch improves the case in which we receive a commit request
but we are already performing one. This behaviour is suspicious
since the HA manager should not trigger a double master transition.
Otherwise, something probably is not configured appropriately.
This improves 98756c2608f0879a2322919c7441973216565272
"cache: close commit request if we already have one in progress".
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/external_cache.c')
-rw-r--r-- | src/external_cache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/external_cache.c b/src/external_cache.c index c1181dc..59c706a 100644 --- a/src/external_cache.c +++ b/src/external_cache.c @@ -90,7 +90,10 @@ static void external_cache_dump(int fd, int type) static int external_cache_commit(struct nfct_handle *h, int fd) { - cache_commit(external, h, fd); + if (!cache_commit(external, h, fd)) { + dlog(LOG_NOTICE, "commit already in progress, skipping"); + return LOCAL_RET_OK; + } /* Keep the client socket open, we want synchronous commits. */ return LOCAL_RET_STOLEN; } |