aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2013-10-10 07:41:44 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2013-10-14 12:01:00 -0400
commit5e94846686d027a4c8ecc5d9d52b18036d3e8f7a (patch)
tree46b3537f5307e673fc1746bed655e9bc5d6e72e4 /include/uapi/linux
parent99633ab29b2131b68089a6c7f60458390860e044 (diff)
netfilter: nf_tables: add insert operation
This patch adds a new rule attribute NFTA_RULE_POSITION which is used to store the position of a rule relatively to the others. By providing the create command and specifying the position, the rule is inserted after the rule with the handle equal to the provided position. Regarding notification, the position attribute specifies the handle of the previous rule to make sure we don't point to any stale rule in notifications coming from the commit path. This patch includes the following fix from Pablo: * nf_tables: fix rule deletion event reporting Signed-off-by: Eric Leblond <eric@regit.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 7d4a1992f89c..fbfd229a8e99 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -153,6 +153,7 @@ enum nft_chain_attributes {
153 * @NFTA_RULE_HANDLE: numeric handle of the rule (NLA_U64) 153 * @NFTA_RULE_HANDLE: numeric handle of the rule (NLA_U64)
154 * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes) 154 * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes)
155 * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes) 155 * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes)
156 * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64)
156 */ 157 */
157enum nft_rule_attributes { 158enum nft_rule_attributes {
158 NFTA_RULE_UNSPEC, 159 NFTA_RULE_UNSPEC,
@@ -161,6 +162,7 @@ enum nft_rule_attributes {
161 NFTA_RULE_HANDLE, 162 NFTA_RULE_HANDLE,
162 NFTA_RULE_EXPRESSIONS, 163 NFTA_RULE_EXPRESSIONS,
163 NFTA_RULE_COMPAT, 164 NFTA_RULE_COMPAT,
165 NFTA_RULE_POSITION,
164 __NFTA_RULE_MAX 166 __NFTA_RULE_MAX
165}; 167};
166#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1) 168#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1)