hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/sched/sch_fq.c
....@@ -779,13 +779,17 @@
779779 return 0;
780780 }
781781
782
+static struct netlink_range_validation iq_range = {
783
+ .max = INT_MAX,
784
+};
785
+
782786 static const struct nla_policy fq_policy[TCA_FQ_MAX + 1] = {
783787 [TCA_FQ_UNSPEC] = { .strict_start_type = TCA_FQ_TIMER_SLACK },
784788
785789 [TCA_FQ_PLIMIT] = { .type = NLA_U32 },
786790 [TCA_FQ_FLOW_PLIMIT] = { .type = NLA_U32 },
787791 [TCA_FQ_QUANTUM] = { .type = NLA_U32 },
788
- [TCA_FQ_INITIAL_QUANTUM] = { .type = NLA_U32 },
792
+ [TCA_FQ_INITIAL_QUANTUM] = NLA_POLICY_FULL_RANGE(NLA_U32, &iq_range),
789793 [TCA_FQ_RATE_ENABLE] = { .type = NLA_U32 },
790794 [TCA_FQ_FLOW_DEFAULT_RATE] = { .type = NLA_U32 },
791795 [TCA_FQ_FLOW_MAX_RATE] = { .type = NLA_U32 },