diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-07-05 00:42:38 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-07-05 00:42:41 +0200 |
commit | 7eb63b5872f07903d952aa5cfd6ad0e7647a066a (patch) | |
tree | 3e9fa50c2822387505b4f4f5bcdb412f9dbf028f /src | |
parent | 8648ae6d08bb84030c2c3519454532f6e04e31d9 (diff) | |
download | conntrack-tools-7eb63b5872f07903d952aa5cfd6ad0e7647a066a.tar.gz conntrack-tools-7eb63b5872f07903d952aa5cfd6ad0e7647a066a.zip |
conntrackd: fix commit operation, needs to be synchronous
While adding the expectation support for conntrackd, I accidentally
broke synchrony in 'conntrackd -c' command.
Basically, conntrackd -c should not return control to the shell
until the cache has been committed.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/sync-mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 6f8eb04..7fb3eba 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -696,7 +696,7 @@ static int local_handler_sync(int fd, int type, void *data) dlog(LOG_NOTICE, "committing expectation cache"); STATE_SYNC(commit).rq[0].cb = STATE_SYNC(external)->exp.commit; STATE_SYNC(commit).rq[1].cb = NULL; - local_commit(fd); + ret = local_commit(fd); break; case ALL_FLUSH_CACHE: /* if we're still committing, abort this command */ @@ -722,7 +722,7 @@ static int local_handler_sync(int fd, int type, void *data) } else { STATE_SYNC(commit).rq[1].cb = NULL; } - local_commit(fd); + ret = local_commit(fd); break; case EXP_DUMP_INT_XML: if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { |