diff options
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r-- | net/sched/sch_red.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index d5e934c33f96..76e8df8447d9 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -135,7 +135,7 @@ red_dequeue(struct Qdisc* sch) | |||
135 | 135 | ||
136 | skb = qdisc_dequeue_head(sch); | 136 | skb = qdisc_dequeue_head(sch); |
137 | 137 | ||
138 | if (skb == NULL) | 138 | if (skb == NULL && !red_is_idling(&q->parms)) |
139 | red_start_of_idle_period(&q->parms); | 139 | red_start_of_idle_period(&q->parms); |
140 | 140 | ||
141 | return skb; | 141 | return skb; |
@@ -154,7 +154,9 @@ static unsigned int red_drop(struct Qdisc* sch) | |||
154 | return len; | 154 | return len; |
155 | } | 155 | } |
156 | 156 | ||
157 | red_start_of_idle_period(&q->parms); | 157 | if (!red_is_idling(&q->parms)) |
158 | red_start_of_idle_period(&q->parms); | ||
159 | |||
158 | return 0; | 160 | return 0; |
159 | } | 161 | } |
160 | 162 | ||