diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-07-05 00:42:38 +0200 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-07-06 17:03:36 -0700 |
commit | a3650c974b2c8a57ea29241ced3a79f0ffb6dff8 (patch) | |
tree | 0d9092ef5380d4572ae10e8b76bfe31633fb48d6 | |
parent | 141fb636bc0bea8e31b65414ce962b06c56028f2 (diff) | |
download | conntrack-tools-a3650c974b2c8a57ea29241ced3a79f0ffb6dff8.tar.gz conntrack-tools-a3650c974b2c8a57ea29241ced3a79f0ffb6dff8.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>
(cherry picked from commit 7eb63b5872f07903d952aa5cfd6ad0e7647a066a)
(cherry picked from commit 93d244a982f80a691bfb6eb4e17e2cccc32a5cb9)
-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 430a9b3..de90135 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -698,7 +698,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 */ @@ -724,7 +724,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) { |