mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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: ea7f8277f9
("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>
This commit is contained in:
parent
5b706e5cac
commit
9f6ed032cd
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user