Message ID | 20230720165143.30208-4-fw@strlen.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 87b5a5c209405cb6b57424cdfa226a6dbd349232 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,1/5] netfilter: nf_tables: fix spurious set element insertion failure | expand |
diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index db526cb7a485..49915a2a58eb 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -1929,7 +1929,11 @@ static void nft_pipapo_remove(const struct net *net, const struct nft_set *set, int i, start, rules_fx; match_start = data; - match_end = (const u8 *)nft_set_ext_key_end(&e->ext)->data; + + if (nft_set_ext_exists(&e->ext, NFT_SET_EXT_KEY_END)) + match_end = (const u8 *)nft_set_ext_key_end(&e->ext)->data; + else + match_end = data; start = first_rule; rules_fx = rules_f0;