diff options
-rw-r--r-- | net/sched/sch_netem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 1fa2f903d22..ffcaa597594 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -605,7 +605,7 @@ static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr) | |||
605 | case NETEM_LOSS_GI: { | 605 | case NETEM_LOSS_GI: { |
606 | const struct tc_netem_gimodel *gi = nla_data(la); | 606 | const struct tc_netem_gimodel *gi = nla_data(la); |
607 | 607 | ||
608 | if (nla_len(la) != sizeof(struct tc_netem_gimodel)) { | 608 | if (nla_len(la) < sizeof(struct tc_netem_gimodel)) { |
609 | pr_info("netem: incorrect gi model size\n"); | 609 | pr_info("netem: incorrect gi model size\n"); |
610 | return -EINVAL; | 610 | return -EINVAL; |
611 | } | 611 | } |
@@ -624,8 +624,8 @@ static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr) | |||
624 | case NETEM_LOSS_GE: { | 624 | case NETEM_LOSS_GE: { |
625 | const struct tc_netem_gemodel *ge = nla_data(la); | 625 | const struct tc_netem_gemodel *ge = nla_data(la); |
626 | 626 | ||
627 | if (nla_len(la) != sizeof(struct tc_netem_gemodel)) { | 627 | if (nla_len(la) < sizeof(struct tc_netem_gemodel)) { |
628 | pr_info("netem: incorrect gi model size\n"); | 628 | pr_info("netem: incorrect ge model size\n"); |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | } | 630 | } |
631 | 631 | ||