mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
sched, act: allow to clear all actions as well
When we change the list of action on a given filter, currently we don't change it to empty. This is a bug, we should allow to change to whatever users given. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Cong Wang <cwang@twopensource.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2f7ef2f879
commit
a49eb42a34
1 changed files with 6 additions and 8 deletions
|
@ -544,14 +544,12 @@ void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
|
||||||
struct tcf_exts *src)
|
struct tcf_exts *src)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_CLS_ACT
|
#ifdef CONFIG_NET_CLS_ACT
|
||||||
if (!list_empty(&src->actions)) {
|
LIST_HEAD(tmp);
|
||||||
LIST_HEAD(tmp);
|
tcf_tree_lock(tp);
|
||||||
tcf_tree_lock(tp);
|
list_splice_init(&dst->actions, &tmp);
|
||||||
list_splice_init(&dst->actions, &tmp);
|
list_splice(&src->actions, &dst->actions);
|
||||||
list_splice(&src->actions, &dst->actions);
|
tcf_tree_unlock(tp);
|
||||||
tcf_tree_unlock(tp);
|
tcf_action_destroy(&tmp, TCA_ACT_UNBIND);
|
||||||
tcf_action_destroy(&tmp, TCA_ACT_UNBIND);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(tcf_exts_change);
|
EXPORT_SYMBOL(tcf_exts_change);
|
||||||
|
|
Loading…
Reference in a new issue