Commit 599d2570 authored by Roi Dayan's avatar Roi Dayan Committed by David S. Miller
Browse files

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: default avatarRoi Dayan <roid@mellanox.com>
Reviewed-by: default avatarVlad Buslov <vladbu@mellanox.com>
Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c6ec179a
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1258,7 +1258,6 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
		fnew->flags |= TCA_CLS_FLAGS_NOT_IN_HW;

	if (fold) {
		if (!tc_skip_sw(fold->flags))
		rhashtable_remove_fast(&fold->mask->ht,
				       &fold->ht_node,
				       fold->mask->filter_ht_params);