]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: add insert operation
authorEric Leblond <eric@regit.org>
Thu, 10 Oct 2013 11:41:44 +0000 (13:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Oct 2013 16:01:00 +0000 (18:01 +0200)
commit52b58e840a291386096092b0c0edd5ce190d1968
tree46b3537f5307e673fc1746bed655e9bc5d6e72e4
parent3829242a042c76ad8c9e0901d9b7dd8f3b7b6d39
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>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c