Commit f5b9bac7 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller

net_sched: notify filter deletion when deleting a chain

When we delete a chain of filters, we need to notify
user-space we are deleting each filters in this chain
too.

Fixes: 32a4f5ec ("net: sched: introduce chain object to uapi")
Cc: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad4f15dc
...@@ -1902,6 +1902,8 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n, ...@@ -1902,6 +1902,8 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n,
RTM_NEWCHAIN, false); RTM_NEWCHAIN, false);
break; break;
case RTM_DELCHAIN: case RTM_DELCHAIN:
tfilter_notify_chain(net, skb, block, q, parent, n,
chain, RTM_DELTFILTER);
/* Flush the chain first as the user requested chain removal. */ /* Flush the chain first as the user requested chain removal. */
tcf_chain_flush(chain); tcf_chain_flush(chain);
/* In case the chain was successfully deleted, put a reference /* In case the chain was successfully deleted, put a reference
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment