.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* net/sched/sch_atm.c - ATM VC selection "queueing discipline" */ |
---|
2 | 3 | |
---|
3 | 4 | /* Written 1998-2000 by Werner Almesberger, EPFL ICA */ |
---|
.. | .. |
---|
57 | 58 | struct atm_flow_data *excess; /* flow for excess traffic; |
---|
58 | 59 | NULL to set CLP instead */ |
---|
59 | 60 | int hdr_len; |
---|
60 | | - unsigned char hdr[0]; /* header data; MUST BE LAST */ |
---|
| 61 | + unsigned char hdr[]; /* header data; MUST BE LAST */ |
---|
61 | 62 | }; |
---|
62 | 63 | |
---|
63 | 64 | struct atm_qdisc_data { |
---|
.. | .. |
---|
223 | 224 | if (opt == NULL) |
---|
224 | 225 | return -EINVAL; |
---|
225 | 226 | |
---|
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); |
---|
227 | 229 | if (error < 0) |
---|
228 | 230 | return error; |
---|
229 | 231 | |
---|
.. | .. |
---|
394 | 396 | result = tcf_classify(skb, fl, &res, true); |
---|
395 | 397 | if (result < 0) |
---|
396 | 398 | continue; |
---|
| 399 | + if (result == TC_ACT_SHOT) |
---|
| 400 | + goto done; |
---|
| 401 | + |
---|
397 | 402 | flow = (struct atm_flow_data *)res.class; |
---|
398 | 403 | if (!flow) |
---|
399 | 404 | flow = lookup_flow(sch, res.classid); |
---|
400 | | - goto done; |
---|
| 405 | + goto drop; |
---|
401 | 406 | } |
---|
402 | 407 | } |
---|
403 | 408 | flow = NULL; |
---|
.. | .. |
---|
573 | 578 | pr_debug("atm_tc_reset(sch %p,[qdisc %p])\n", sch, p); |
---|
574 | 579 | list_for_each_entry(flow, &p->flows, list) |
---|
575 | 580 | qdisc_reset(flow->q); |
---|
576 | | - sch->q.qlen = 0; |
---|
577 | 581 | } |
---|
578 | 582 | |
---|
579 | 583 | static void atm_tc_destroy(struct Qdisc *sch) |
---|
.. | .. |
---|
609 | 613 | tcm->tcm_handle = flow->common.classid; |
---|
610 | 614 | tcm->tcm_info = flow->q->handle; |
---|
611 | 615 | |
---|
612 | | - nest = nla_nest_start(skb, TCA_OPTIONS); |
---|
| 616 | + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); |
---|
613 | 617 | if (nest == NULL) |
---|
614 | 618 | goto nla_put_failure; |
---|
615 | 619 | |
---|