hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/sched/sch_atm.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* net/sched/sch_atm.c - ATM VC selection "queueing discipline" */
23
34 /* Written 1998-2000 by Werner Almesberger, EPFL ICA */
....@@ -57,7 +58,7 @@
5758 struct atm_flow_data *excess; /* flow for excess traffic;
5859 NULL to set CLP instead */
5960 int hdr_len;
60
- unsigned char hdr[0]; /* header data; MUST BE LAST */
61
+ unsigned char hdr[]; /* header data; MUST BE LAST */
6162 };
6263
6364 struct atm_qdisc_data {
....@@ -223,7 +224,8 @@
223224 if (opt == NULL)
224225 return -EINVAL;
225226
226
- error = nla_parse_nested(tb, TCA_ATM_MAX, opt, atm_policy, NULL);
227
+ error = nla_parse_nested_deprecated(tb, TCA_ATM_MAX, opt, atm_policy,
228
+ NULL);
227229 if (error < 0)
228230 return error;
229231
....@@ -394,10 +396,13 @@
394396 result = tcf_classify(skb, fl, &res, true);
395397 if (result < 0)
396398 continue;
399
+ if (result == TC_ACT_SHOT)
400
+ goto done;
401
+
397402 flow = (struct atm_flow_data *)res.class;
398403 if (!flow)
399404 flow = lookup_flow(sch, res.classid);
400
- goto done;
405
+ goto drop;
401406 }
402407 }
403408 flow = NULL;
....@@ -573,7 +578,6 @@
573578 pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p);
574579 list_for_each_entry(flow, &p->flows, list)
575580 qdisc_reset(flow->q);
576
- sch->q.qlen = 0;
577581 }
578582
579583 static void atm_tc_destroy(struct Qdisc *sch)
....@@ -609,7 +613,7 @@
609613 tcm->tcm_handle = flow->common.classid;
610614 tcm->tcm_info = flow->q->handle;
611615
612
- nest = nla_nest_start(skb, TCA_OPTIONS);
616
+ nest = nla_nest_start_noflag(skb, TCA_OPTIONS);
613617 if (nest == NULL)
614618 goto nla_put_failure;
615619