projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0165d93
)
netfilter: nf_tables: do not allow NFT_SET_ELEM_INTERVAL_END flag and data
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 7 Feb 2014 11:53:07 +0000
(12:53 +0100)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 7 Feb 2014 13:21:49 +0000
(14:21 +0100)
This combination is not allowed since end interval elements cannot
contain data.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_tables_api.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index 3a2e4800b41564f67f573cfa01a5a37772a7a83d..d0c790e3e495c3b68bf9b53e617aaa12099f331e 100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-2741,6
+2741,9
@@
static int nft_add_set_elem(const struct nft_ctx *ctx, struct nft_set *set,
if (nla[NFTA_SET_ELEM_DATA] == NULL &&
!(elem.flags & NFT_SET_ELEM_INTERVAL_END))
return -EINVAL;
+ if (nla[NFTA_SET_ELEM_DATA] != NULL &&
+ elem.flags & NFT_SET_ELEM_INTERVAL_END)
+ return -EINVAL;
} else {
if (nla[NFTA_SET_ELEM_DATA] != NULL)
return -EINVAL;