diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2008-08-08 05:37:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-08 05:37:22 +0200 |
commit | 76aab2c1eae491a5d73ac83deec97dd28ebac584 (patch) | |
tree | ba680489b5dc20cc1afad6c5c0fef36b31918d9a /net | |
parent | bnx2x: fix logical op (diff) | |
download | linux-76aab2c1eae491a5d73ac83deec97dd28ebac584.tar.xz linux-76aab2c1eae491a5d73ac83deec97dd28ebac584.zip |
pkt_sched: Fix actions referencing
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/act_api.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index d308c19aa3f9..26c7e1f9a350 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -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; |