netfilter: nf_tables: remove useless U8_MAX validation
authorLiping Zhang <zlpnobody@gmail.com>
Sat, 29 Oct 2016 13:56:27 +0000 (21:56 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 1 Nov 2016 19:50:32 +0000 (20:50 +0100)
commite41e9d623cd77dbe970b15a4c06a0765c3657bdd
tree6228a3a577106b902c87388b18f603d5b733f41b
parent2fa841938c648fe4359691f41e8e1f37ff1a3aa2
netfilter: nf_tables: remove useless U8_MAX validation

After call nft_data_init, size is already validated and desc.len will
not exceed the sizeof(struct nft_data), i.e. 16 bytes. So it will never
exceed U8_MAX.

Furthermore, in nft_immediate_init, we forget to call nft_data_uninit
when desc.len exceeds U8_MAX, although this will not happen, but it's
a logical mistake.

Now remove these redundant validation introduced by commit 36b701fae12a
("netfilter: nf_tables: validate maximum value of u32 netlink attributes")

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_cmp.c
net/netfilter/nft_immediate.c