netfilter: nf_tables: add insert operation
commit5e94846686d027a4c8ecc5d9d52b18036d3e8f7a
authorEric Leblond <eric@regit.org>
Thu, 10 Oct 2013 11:41:44 +0000 (10 13:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Oct 2013 16:01:00 +0000 (14 18:01 +0200)
tree46b3537f5307e673fc1746bed655e9bc5d6e72e4
parent99633ab29b2131b68089a6c7f60458390860e044
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