提交 eff7979f 编写于 作者: S stephen hemminger 提交者: David S. Miller

netem: fix gemodel loss generator

Patch from developers of the alternative loss models, downloaded from:
   http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG

 "in case 2, of the switch we change the direction of the inequality to
  net_random()>clg->a3, because clg->a3 is h in the GE model and when h
  is 0 all packets will be lost."
Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ab6c27be
......@@ -272,7 +272,7 @@ static bool loss_gilb_ell(struct netem_sched_data *q)
case 2:
if (net_random() < clg->a2)
clg->state = 1;
if (clg->a3 > net_random())
if (net_random() > clg->a3)
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册