diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-10-10 17:21:26 -0400 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-10-14 11:16:11 -0400 |
| commit | 9370761c56b66aa5c65e069a7b010111a025018d (patch) | |
| tree | 0b9080fdb768fc5f8f16c685de605d07347283f9 /include/uapi/linux | |
| parent | c29b72e02573b8fe5e6cae5d192a6a4772e7bbd6 (diff) | |
netfilter: nf_tables: convert built-in tables/chains to chain types
This patch converts built-in tables/chains to chain types that
allows you to deploy customized table and chain configurations from
userspace.
After this patch, you have to specify the chain type when
creating a new chain:
add chain ip filter output { type filter hook input priority 0; }
^^^^ ------
The existing chain types after this patch are: filter, route and
nat. Note that tables are just containers of chains with no specific
semantics, which is a significant change with regards to iptables.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/netfilter/nf_tables.h | 2 |
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 9e924014efe3..779cf951c8de 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -115,6 +115,7 @@ enum nft_table_attributes { | |||
| 115 | * @NFTA_CHAIN_HANDLE: numeric handle of the chain (NLA_U64) | 115 | * @NFTA_CHAIN_HANDLE: numeric handle of the chain (NLA_U64) |
| 116 | * @NFTA_CHAIN_NAME: name of the chain (NLA_STRING) | 116 | * @NFTA_CHAIN_NAME: name of the chain (NLA_STRING) |
| 117 | * @NFTA_CHAIN_HOOK: hook specification for basechains (NLA_NESTED: nft_hook_attributes) | 117 | * @NFTA_CHAIN_HOOK: hook specification for basechains (NLA_NESTED: nft_hook_attributes) |
| 118 | * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING) | ||
| 118 | */ | 119 | */ |
| 119 | enum nft_chain_attributes { | 120 | enum nft_chain_attributes { |
| 120 | NFTA_CHAIN_UNSPEC, | 121 | NFTA_CHAIN_UNSPEC, |
| @@ -122,6 +123,7 @@ enum nft_chain_attributes { | |||
| 122 | NFTA_CHAIN_HANDLE, | 123 | NFTA_CHAIN_HANDLE, |
| 123 | NFTA_CHAIN_NAME, | 124 | NFTA_CHAIN_NAME, |
| 124 | NFTA_CHAIN_HOOK, | 125 | NFTA_CHAIN_HOOK, |
| 126 | NFTA_CHAIN_TYPE, | ||
| 125 | __NFTA_CHAIN_MAX | 127 | __NFTA_CHAIN_MAX |
| 126 | }; | 128 | }; |
| 127 | #define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1) | 129 | #define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1) |
