netfilter: nf_tables: add NFTA_SET_USERDATA if not null
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Aug 2020 12:12:54 +0000 (14:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:14 +0000 (19:14 +0200)
commite8261af70717a359d1364a2fc23ba9299051f169
treeae831df1b9334845418d80c5d7b1f928f4cf6e4d
parent20a7ee03beba4e071b85ebeba2166f892a94d24d
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: e6d8ecac9e68 ("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>
net/netfilter/nf_tables_api.c