提交 a8aaa995 编写于 作者: T Thomas Graf 提交者: Thomas Graf

[PKT_SCHED]: GRED: Report out-of-bound DPs as illegal

Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
上级 6639607e
......@@ -451,12 +451,9 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt)
return -EINVAL;
ctl = RTA_DATA(tb[TCA_GRED_PARMS-1]);
if (ctl->DP > MAX_DPs-1 ) {
/* misbehaving is punished! Put in the default drop probability */
DPRINTK("\nGRED: DP %u not in the proper range fixed. New DP "
"set to default at %d\n",ctl->DP,table->def);
ctl->DP=table->def;
}
if (ctl->DP >= table->DPs)
return -EINVAL;
if (table->tab[ctl->DP] == NULL) {
table->tab[ctl->DP]=kmalloc(sizeof(struct gred_sched_data),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册