summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMikhail Sennikovsky <mikhail.sennikovskii@ionos.com>2022-07-08 12:46:09 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-07-08 12:50:07 +0200
commite42ea65e9c93ff6ebb9627943370aedab853eb46 (patch)
tree5f2141bf6a1ac35e93a4cd09b42830eee875d126 /include
parentccf225870d8dd5ea40df442ce5080dd64c4181c7 (diff)
conntrack: introduce new -A command
The -A command works exactly the same way as -I except that it does not fail if the ct entry already exists. This command is useful for the batched ct loads to not abort if some entries being applied exist. The ct entry dump in the "save" format is now switched to use the -A command as well for the generated output. Also tests added to cover the -A command. Signed-off-by: Mikhail Sennikovsky <mikhail.sennikovskii@ionos.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/conntrack.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/conntrack.h b/include/conntrack.h
index bc17af0..6dad4a1 100644
--- a/include/conntrack.h
+++ b/include/conntrack.h
@@ -71,7 +71,10 @@ enum ct_command {
EXP_STATS_BIT = 18,
EXP_STATS = (1 << EXP_STATS_BIT),
- _CT_BIT_MAX = 19,
+ CT_ADD_BIT = 19,
+ CT_ADD = (1 << CT_ADD_BIT),
+
+ _CT_BIT_MAX = 20,
};
#define NUMBER_OF_CMD _CT_BIT_MAX