aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2008-08-07 23:37:22 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-07 23:37:22 -0400
commit76aab2c1eae491a5d73ac83deec97dd28ebac584 (patch)
treeba680489b5dc20cc1afad6c5c0fef36b31918d9a /net/sched
parent4ab84d450e24b3a309608182a8d8e30626b46f8f (diff)
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/sched')
-rw-r--r--net/sched/act_api.c5
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,
205{ 205{
206 struct tcf_common *p = NULL; 206 struct tcf_common *p = NULL;
207 if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) { 207 if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) {
208 if (bind) { 208 if (bind)
209 p->tcfc_bindcnt++; 209 p->tcfc_bindcnt++;
210 p->tcfc_refcnt++; 210 p->tcfc_refcnt++;
211 }
212 a->priv = p; 211 a->priv = p;
213 } 212 }
214 return p; 213 return p;