diff options
author | Arturo Borrero Gonzalez <arturo@debian.org> | 2017-04-20 19:28:11 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-05-08 19:50:28 +0200 |
commit | 131df891f77dc75515d5eabdedd9818105d29f5a (patch) | |
tree | f3796e75c40ebd4ac63d0a1d013934b358d22abf /src/sync-ftfw.c | |
parent | 381827a8152d27d8afe92a914968b814ec9ac155 (diff) |
conntrackd: factorize resync operations
Resync operations factorization. There are two:
* resync_send --> conntrackd -B (send bulk resync)
* resync_req --> conntrackd -n (request resync)
Future patches reuse this factorized code.
Signed-off-by: Arturo Borrero Gonzalez <arturo@debian.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-ftfw.c')
-rw-r--r-- | src/sync-ftfw.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c index ce5270b..6fdb058 100644 --- a/src/sync-ftfw.c +++ b/src/sync-ftfw.c @@ -26,6 +26,7 @@ #include "log.h" #include "cache.h" #include "fds.h" +#include "resync.h" #include <string.h> #include <errno.h> @@ -189,15 +190,10 @@ static int ftfw_local(int fd, int type, void *data) switch(type) { case REQUEST_DUMP: - dlog(LOG_NOTICE, "request resync"); - tx_queue_add_ctlmsg(NET_F_RESYNC, 0, 0); + resync_req(); break; case SEND_BULK: - dlog(LOG_NOTICE, "sending bulk update"); - cache_iterate(STATE(mode)->internal->ct.data, - NULL, do_cache_to_tx); - cache_iterate(STATE(mode)->internal->exp.data, - NULL, do_cache_to_tx); + resync_send(do_cache_to_tx); break; case STATS_RSQUEUE: ftfw_local_queue(fd); |