Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a49eb42a authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

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: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarCong Wang <cwang@twopensource.com>
Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f7ef2f8
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -544,14 +544,12 @@ void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
		     struct tcf_exts *src)
{
#ifdef CONFIG_NET_CLS_ACT
	if (!list_empty(&src->actions)) {
	LIST_HEAD(tmp);
	tcf_tree_lock(tp);
	list_splice_init(&dst->actions, &tmp);
	list_splice(&src->actions, &dst->actions);
	tcf_tree_unlock(tp);
	tcf_action_destroy(&tmp, TCA_ACT_UNBIND);
	}
#endif
}
EXPORT_SYMBOL(tcf_exts_change);