From d9fc8b6ff3ad433dc42e7380e8ec71446d7541e0 Mon Sep 17 00:00:00 2001 From: Kim Nordlund Date: Fri, 1 Dec 2006 20:21:44 -0800 Subject: [PATCH] --- yaml --- r: 41979 b: refs/heads/master c: a163148c1bec895c1332ea5be497bcda8ce110df h: refs/heads/master i: 41977: 0475c026c3897bb257840c3e099274aab72eef26 41975: 9e63d226f1f8564933f9b12d7d88d89d04116728 v: v3 --- [refs] | 2 +- trunk/net/sched/act_gact.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index c081a34e39da..f9c2f255d0ca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b251df1039f560ef88a9180a80023e4f82596bd +refs/heads/master: a163148c1bec895c1332ea5be497bcda8ce110df diff --git a/trunk/net/sched/act_gact.c b/trunk/net/sched/act_gact.c index 6cff56696a81..85de7efd5fea 100644 --- a/trunk/net/sched/act_gact.c +++ b/trunk/net/sched/act_gact.c @@ -48,14 +48,14 @@ static struct tcf_hashinfo gact_hash_info = { #ifdef CONFIG_GACT_PROB static int gact_net_rand(struct tcf_gact *gact) { - if (net_random() % gact->tcfg_pval) + if (!gact->tcfg_pval || net_random() % gact->tcfg_pval) return gact->tcf_action; return gact->tcfg_paction; } static int gact_determ(struct tcf_gact *gact) { - if (gact->tcf_bstats.packets % gact->tcfg_pval) + if (!gact->tcfg_pval || gact->tcf_bstats.packets % gact->tcfg_pval) return gact->tcf_action; return gact->tcfg_paction; }