diff options
author | Patrick McHardy <kaber@trash.net> | 2010-07-06 05:57:22 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-06 05:57:22 +0200 |
commit | d4aea11c6a7674e4290dc71a4ac93c1d5be7240d (patch) | |
tree | 252eb3d12a9ee4b8910ce911919ca7141e042924 /include/rule.h | |
parent | b20ba656ba7de066d4dcf5ebeef605e6acc7e01d (diff) |
netlink: fix creation of base chains with hooknum and priority 0
Base chains with both a hook number and priority of zero are created
as regular chains. Fix by adding a BASECHAIN flag indicating that the
chain should be created as a base chain.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/rule.h')
-rw-r--r-- | include/rule.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h index 97543072..23171ffb 100644 --- a/include/rule.h +++ b/include/rule.h @@ -79,10 +79,20 @@ extern void table_add_hash(struct table *table); extern struct table *table_lookup(const struct handle *h); /** + * enum chain_flags - chain flags + * + * @CHAIN_F_BASECHAIN: chain is a base chain + */ +enum chain_flags { + CHAIN_F_BASECHAIN = 0x1, +}; + +/** * struct chain - nftables chain * * @list: list node in table list * @handle: chain handle + * @flags: chain flags * @hooknum: hook number (base chains) * @priority: hook priority (base chains) * @rules: rules contained in the chain @@ -90,6 +100,7 @@ extern struct table *table_lookup(const struct handle *h); struct chain { struct list_head list; struct handle handle; + uint32_t flags; unsigned int hooknum; unsigned int priority; struct scope scope; |