diff options
author | Eric Leblond <eric@regit.org> | 2013-07-06 17:33:57 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-19 17:48:11 +0200 |
commit | df84fdeb32c7a76388dd456a835b5f29e0c9caa1 (patch) | |
tree | d8d913a8b4c2fe36d91bedaf49f4891be5b1d2fb /include | |
parent | 4f6c75e40ac8898feaa5ca39f7934268a7f7796a (diff) |
src: Add support for insertion inside rule list
This patch adds support to insert and to add rule using a rule
handle as reference. The rule handle syntax has an new optional
position field which take a handle as argument.
Two examples:
nft add rule filter output position 5 ip daddr 1.2.3.1 drop
nft insert rule filter output position 5 ip daddr 1.2.3.1 drop
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/rule.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h index e0debe3b..2577cff5 100644 --- a/include/rule.h +++ b/include/rule.h @@ -13,6 +13,7 @@ * @chain: chain name (chains and rules only) * @set: set name (sets only) * @handle: rule handle (rules only) + * @position: rule position (rules only) */ struct handle { uint32_t family; @@ -20,6 +21,7 @@ struct handle { const char *chain; const char *set; uint64_t handle; + uint64_t position; }; extern void handle_merge(struct handle *dst, const struct handle *src); |