net/sched: fix infinite loop in sch_fq_pie
[linux-2.6-microblaze.git] / net / sched / sch_fq_pie.c
index a9da877..fb760ce 100644 (file)
@@ -297,9 +297,9 @@ static int fq_pie_change(struct Qdisc *sch, struct nlattr *opt,
                        goto flow_error;
                }
                q->flows_cnt = nla_get_u32(tb[TCA_FQ_PIE_FLOWS]);
-               if (!q->flows_cnt || q->flows_cnt > 65536) {
+               if (!q->flows_cnt || q->flows_cnt >= 65536) {
                        NL_SET_ERR_MSG_MOD(extack,
-                                          "Number of flows must be < 65536");
+                                          "Number of flows must range in [1..65535]");
                        goto flow_error;
                }
        }