From 451dafe6f5e1add75793597ba9bd0e3fddf2d7f9 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 22 Jan 2012 22:00:54 +0100 Subject: conntrackd: support `-i exp -x' and `-e exp -x' options This patch allows you to dump the internal and external expectation cache in XML. % conntrackd -i exp -x 192.168.1.135130.89.148.12255.255.255.255255.255.255.255192.168.1.135130.89.148.12090820655355051821ftp Signed-off-by: Pablo Neira Ayuso --- src/sync-mode.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/sync-mode.c') diff --git a/src/sync-mode.c b/src/sync-mode.c index 2505631..10fdb9e 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -706,6 +706,18 @@ static int local_handler_sync(int fd, int type, void *data) } local_commit(fd); break; + case EXP_DUMP_INT_XML: + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { + STATE(mode)->internal->exp.dump(fd, NFCT_O_XML); + exit(EXIT_SUCCESS); + } + break; + case EXP_DUMP_EXT_XML: + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { + STATE_SYNC(external)->exp.dump(fd, NFCT_O_XML); + exit(EXIT_SUCCESS); + } + break; default: if (STATE_SYNC(sync)->local) ret = STATE_SYNC(sync)->local(fd, type, data); -- cgit v1.2.3