mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
netfilter: nf_tables: add NFTA_SET_USERDATA if not null
[ Upstream commit 6f03bf43ee05b31d3822def2a80f11b3591c55b3 ]
Kernel sends an empty NFTA_SET_USERDATA attribute with no value if
userspace adds a set with no NFTA_SET_USERDATA attribute.
Fixes: e6d8ecac9e ("netfilter: nf_tables: Add new attributes into nft_set to store user data.")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fb1e97674a
commit
929d07feb9
1 changed files with 2 additions and 1 deletions
|
|
@ -3353,7 +3353,8 @@ static int nf_tables_fill_set(struct sk_buff *skb, const struct nft_ctx *ctx,
|
|||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
if (nla_put(skb, NFTA_SET_USERDATA, set->udlen, set->udata))
|
||||
if (set->udata &&
|
||||
nla_put(skb, NFTA_SET_USERDATA, set->udlen, set->udata))
|
||||
goto nla_put_failure;
|
||||
|
||||
desc = nla_nest_start_noflag(skb, NFTA_SET_DESC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue