diff options
author | Patrick McHardy <kaber@trash.net> | 2014-02-05 10:03:37 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-02-05 18:05:36 -0500 |
commit | 64d46806b6218c97f68742c5663a8ae3a5fbe838 (patch) | |
tree | dae05e9ed5cee0d1fbd257058b953f21df4ca9b1 /include | |
parent | 51292c0735eb2d9e29115cbf6264845e19a6c77d (diff) |
netfilter: nf_tables: add AF specific expression support
For the reject module, we need to add AF-specific implementations to
get rid of incorrect module dependencies. Try to load an AF-specific
module first and fall back to generic modules.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_tables.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 57c8ff7955df..0f68e47d3e5e 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
@@ -252,6 +252,7 @@ void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, | |||
252 | * @owner: module reference | 252 | * @owner: module reference |
253 | * @policy: netlink attribute policy | 253 | * @policy: netlink attribute policy |
254 | * @maxattr: highest netlink attribute number | 254 | * @maxattr: highest netlink attribute number |
255 | * @family: address family for AF-specific types | ||
255 | */ | 256 | */ |
256 | struct nft_expr_type { | 257 | struct nft_expr_type { |
257 | const struct nft_expr_ops *(*select_ops)(const struct nft_ctx *, | 258 | const struct nft_expr_ops *(*select_ops)(const struct nft_ctx *, |
@@ -262,6 +263,7 @@ struct nft_expr_type { | |||
262 | struct module *owner; | 263 | struct module *owner; |
263 | const struct nla_policy *policy; | 264 | const struct nla_policy *policy; |
264 | unsigned int maxattr; | 265 | unsigned int maxattr; |
266 | u8 family; | ||
265 | }; | 267 | }; |
266 | 268 | ||
267 | /** | 269 | /** |
@@ -529,6 +531,9 @@ void nft_unregister_expr(struct nft_expr_type *); | |||
529 | #define MODULE_ALIAS_NFT_CHAIN(family, name) \ | 531 | #define MODULE_ALIAS_NFT_CHAIN(family, name) \ |
530 | MODULE_ALIAS("nft-chain-" __stringify(family) "-" name) | 532 | MODULE_ALIAS("nft-chain-" __stringify(family) "-" name) |
531 | 533 | ||
534 | #define MODULE_ALIAS_NFT_AF_EXPR(family, name) \ | ||
535 | MODULE_ALIAS("nft-expr-" __stringify(family) "-" name) | ||
536 | |||
532 | #define MODULE_ALIAS_NFT_EXPR(name) \ | 537 | #define MODULE_ALIAS_NFT_EXPR(name) \ |
533 | MODULE_ALIAS("nft-expr-" name) | 538 | MODULE_ALIAS("nft-expr-" name) |
534 | 539 | ||