Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41979
b: refs/heads/master
c: a163148
h: refs/heads/master
i:
  41977: 0475c02
  41975: 9e63d22
v: v3
  • Loading branch information
Kim Nordlund authored and David S. Miller committed Dec 3, 2006
1 parent 5b9b7f7 commit d9fc8b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b251df1039f560ef88a9180a80023e4f82596bd
refs/heads/master: a163148c1bec895c1332ea5be497bcda8ce110df
4 changes: 2 additions & 2 deletions trunk/net/sched/act_gact.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d9fc8b6

Please sign in to comment.