Skip to content

Commit 0d3601d

Browse files
committed
netfilter: nft_set_hash: skip fixed hash if timeout is specified
Fixed hash supports to timeouts, so skip it. Otherwise, userspace hits EOPNOTSUPP. Fixes: 6c03ae2 ("netfilter: nft_set_hash: add non-resizable hashtable implementation") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent ce38061 commit 0d3601d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/netfilter/nft_set_hash.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ static const struct nft_set_ops *
674674
nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc,
675675
u32 flags)
676676
{
677-
if (desc->size) {
677+
if (desc->size && !(flags & NFT_SET_TIMEOUT)) {
678678
switch (desc->klen) {
679679
case 4:
680680
return &nft_hash_fast_ops;

0 commit comments

Comments
 (0)