Commit 7c2781fa authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

netem: missing break in ge loss generator

There is a missing break statement in the Gilbert Elliot loss model
generator which makes state machine behave incorrectly.

Reported-by: Martin Burri <martin.burri@ch.abb.com
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 98bf8362
...@@ -268,6 +268,7 @@ static bool loss_gilb_ell(struct netem_sched_data *q) ...@@ -268,6 +268,7 @@ static bool loss_gilb_ell(struct netem_sched_data *q)
clg->state = 2; clg->state = 2;
if (net_random() < clg->a4) if (net_random() < clg->a4)
return true; return true;
break;
case 2: case 2:
if (net_random() < clg->a2) if (net_random() < clg->a2)
clg->state = 1; clg->state = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment