Skip to content

Commit

Permalink
pkt_sched: Fix actions referencing
Browse files Browse the repository at this point in the history
When an action is added several times with the same exact index
it gets deleted on every even-numbered attempt.
This fixes that issue.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jamal Hadi Salim authored and David S. Miller committed Aug 8, 2008
1 parent 4ab84d4 commit 76aab2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, int bind,
{
struct tcf_common *p = NULL;
if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) {
if (bind) {
if (bind)
p->tcfc_bindcnt++;
p->tcfc_refcnt++;
}
p->tcfc_refcnt++;
a->priv = p;
}
return p;
Expand Down

0 comments on commit 76aab2c

Please sign in to comment.