summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2016-06-17 00:19:29 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-17 08:50:16 +0300
commit9f6ed032cd951d2427995578c51af1b50c054efa (patch)
tree6b7640286c1f14d7bb12f04e621d7bf211c7b847
parent5b706e5caccdbccacc1dc6abe7a6e38957853945 (diff)
downloadlinux-9f6ed032cd951d2427995578c51af1b50c054efa.tar.xz
net, cls: also reject deleting all filters when TCA_KIND present
When we check for RTM_DELTFILTER, we should also reject the request for deleting all filters under a given parent when TCA_KIND attribute is present. If present, it's currently just ignored but there's also no point to let it pass in the first place either since this doesn't have any meaning with wild-card removal. Fixes: ea7f8277f907 ("net, cls: allow for deleting all filters for given parent") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/cls_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index cca1ef5e5476..843a716a4303 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -169,7 +169,7 @@ replay:
if (prio == 0) {
switch (n->nlmsg_type) {
case RTM_DELTFILTER:
- if (protocol || t->tcm_handle)
+ if (protocol || t->tcm_handle || tca[TCA_KIND])
return -ENOENT;
break;
case RTM_NEWTFILTER: