Skip to content

Commit

Permalink
netem: missing break in ge loss generator
Browse files Browse the repository at this point in the history
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: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Nov 30, 2013
1 parent 98bf836 commit 7c2781f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ static bool loss_gilb_ell(struct netem_sched_data *q)
clg->state = 2;
if (net_random() < clg->a4)
return true;
break;
case 2:
if (net_random() < clg->a2)
clg->state = 1;
Expand Down

0 comments on commit 7c2781f

Please sign in to comment.