diff options
author | Mirek Kratochvil <exa.exa@gmail.com> | 2015-05-15 15:15:29 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-05-15 16:07:30 -0400 |
commit | 960bd2c26421d321e890f1936938196ead41976f (patch) | |
tree | 1938e03310f4212d0d3dcdbae2a9f2282ea39781 /net/netfilter | |
parent | b3cad287d13b5f6695c6b4aab72969cd64bf0171 (diff) |
netfilter: nf_tables: fix bogus warning in nft_data_uninit()
The values 0x00000000-0xfffffeff are reserved for userspace datatype. When,
deleting set elements with maps, a bogus warning is triggered.
WARNING: CPU: 0 PID: 11133 at net/netfilter/nf_tables_api.c:4481 nft_data_uninit+0x35/0x40 [nf_tables]()
This fixes the check accordingly to enum definition in
include/linux/netfilter/nf_tables.h
Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=1013
Signed-off-by: Mirek Kratochvil <exa.exa@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index ad9d11fb29fd..34ded09317e7 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c | |||
@@ -4472,9 +4472,9 @@ EXPORT_SYMBOL_GPL(nft_data_init); | |||
4472 | */ | 4472 | */ |
4473 | void nft_data_uninit(const struct nft_data *data, enum nft_data_types type) | 4473 | void nft_data_uninit(const struct nft_data *data, enum nft_data_types type) |
4474 | { | 4474 | { |
4475 | switch (type) { | 4475 | if (type < NFT_DATA_VERDICT) |
4476 | case NFT_DATA_VALUE: | ||
4477 | return; | 4476 | return; |
4477 | switch (type) { | ||
4478 | case NFT_DATA_VERDICT: | 4478 | case NFT_DATA_VERDICT: |
4479 | return nft_verdict_uninit(data); | 4479 | return nft_verdict_uninit(data); |
4480 | default: | 4480 | default: |