summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/pkt_sched.h1
-rw-r--r--net/sched/sch_netem.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 5afee2b238bd..891382268fe1 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -495,6 +495,7 @@ struct tc_netem_corrupt {
};
#define NETEM_DIST_SCALE 8192
+#define NETEM_DIST_MAX 16384
/* DRR */
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 86dad1eee549..289febd3ccac 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -332,7 +332,7 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
int i;
size_t s;
- if (n > 65536)
+ if (n > NETEM_DIST_MAX)
return -EINVAL;
s = sizeof(struct disttable) + n * sizeof(s16);