Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c472203 authored by Nogah Frankel's avatar Nogah Frankel Committed by David S. Miller
Browse files

net_sched: red: Avoid devision by zero



Do not allow delta value to be zero since it is used as a divisor.

Fixes: 8af2a218 ("sch_red: Adaptative RED AQM")
Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58117672
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static inline void red_set_parms(struct red_parms *p,
	p->qth_max	= qth_max << Wlog;
	p->Wlog		= Wlog;
	p->Plog		= Plog;
	if (delta < 0)
	if (delta <= 0)
		delta = 1;
	p->qth_delta	= delta;
	if (!max_P) {