提交 599d2570 编写于 作者: R Roi Dayan 提交者: David S. Miller

net/sched: cls_flower: Remove old entries from rhashtable

When replacing a rule we add the new rule to the rhashtable
but only remove the old if not in skip_sw.
This commit fix this and remove the old rule anyway.

Fixes: 35cc3cef ("net/sched: cls_flower: Reject duplicated rules also under skip_sw")
Signed-off-by: NRoi Dayan <roid@mellanox.com>
Reviewed-by: NVlad Buslov <vladbu@mellanox.com>
Acked-by: NOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c6ec179a
...@@ -1258,10 +1258,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, ...@@ -1258,10 +1258,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW; fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;
if (fold) { if (fold) {
if (!tc_skip_sw(fold->flags)) rhashtable_remove_fast(&fold->mask->ht,
rhashtable_remove_fast(&fold->mask->ht, &fold->ht_node,
&fold->ht_node, fold->mask->filter_ht_params);
fold->mask->filter_ht_params);
if (!tc_skip_hw(fold->flags)) if (!tc_skip_hw(fold->flags))
fl_hw_destroy_filter(tp, fold, NULL); fl_hw_destroy_filter(tp, fold, NULL);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册