Skip to content

Commit ef516e8

Browse files
committed
netfilter: nf_tables: reintroduce the NFT_SET_CONCAT flag
Stefano originally proposed to introduce this flag, users hit EOPNOTSUPP in new binaries with old kernels when defining a set with ranges in a concatenation. Fixes: f3a2181 ("netfilter: nf_tables: Support for sets with multiple ranged fields") Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent d9583cd commit ef516e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/uapi/linux/netfilter/nf_tables.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ enum nft_rule_compat_attributes {
276276
* @NFT_SET_TIMEOUT: set uses timeouts
277277
* @NFT_SET_EVAL: set can be updated from the evaluation path
278278
* @NFT_SET_OBJECT: set contains stateful objects
279+
* @NFT_SET_CONCAT: set contains a concatenation
279280
*/
280281
enum nft_set_flags {
281282
NFT_SET_ANONYMOUS = 0x1,
@@ -285,6 +286,7 @@ enum nft_set_flags {
285286
NFT_SET_TIMEOUT = 0x10,
286287
NFT_SET_EVAL = 0x20,
287288
NFT_SET_OBJECT = 0x40,
289+
NFT_SET_CONCAT = 0x80,
288290
};
289291

290292
/**

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,7 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,
39623962
if (flags & ~(NFT_SET_ANONYMOUS | NFT_SET_CONSTANT |
39633963
NFT_SET_INTERVAL | NFT_SET_TIMEOUT |
39643964
NFT_SET_MAP | NFT_SET_EVAL |
3965-
NFT_SET_OBJECT))
3965+
NFT_SET_OBJECT | NFT_SET_CONCAT))
39663966
return -EOPNOTSUPP;
39673967
/* Only one of these operations is supported */
39683968
if ((flags & (NFT_SET_MAP | NFT_SET_OBJECT)) ==

0 commit comments

Comments
 (0)