X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fact_gact.c;h=a1e68f78dcc291359e297786b564d8b062fc2ffd;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=a29d0f667639084ccfcf9ff6b0f5f317915885cc;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index a29d0f667..a1e68f78d 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -54,14 +55,14 @@ static DEFINE_RWLOCK(gact_lock); #ifdef CONFIG_GACT_PROB static int gact_net_rand(struct tcf_gact *p) { - if (!p->pval || net_random()%p->pval) + if (net_random()%p->pval) return p->action; return p->paction; } static int gact_determ(struct tcf_gact *p) { - if (!p->pval || p->bstats.packets%p->pval) + if (p->bstats.packets%p->pval) return p->action; return p->paction; }