netem: missing break in ge loss generator
authorstephen hemminger <stephen@networkplumber.org>
Fri, 29 Nov 2013 19:02:43 +0000 (11:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Nov 2013 17:49:28 +0000 (12:49 -0500)
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>
net/sched/sch_netem.c

index 75c94e59a3bd3889cd87460afe87ac611eeb024e..6e91323f3dac8ce4c0e1eb57dbaa19ecc7a2a639 100644 (file)
@@ -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;