linux-stable/net/sched
Ivan Vecera eb53f7af6f net/sched: cls_u32: fix cls_u32 on filter replace
The following sequence is currently broken:

 # tc qdisc add dev foo ingress
 # tc filter replace dev foo protocol all ingress \
   u32 match u8 0 0 action mirred egress mirror dev bar1
 # tc filter replace dev foo protocol all ingress \
   handle 800::800 pref 49152 \
   u32 match u8 0 0 action mirred egress mirror dev bar2
 Error: cls_u32: Key node flags do not match passed flags.
 We have an error talking to the kernel, -1

The error comes from u32_change() when comparing new and
existing flags. The existing ones always contains one of
TCA_CLS_FLAGS_{,NOT}_IN_HW flag depending on offloading state.
These flags cannot be passed from userspace so the condition
(n->flags != flags) in u32_change() always fails.

Fix the condition so the flags TCA_CLS_FLAGS_NOT_IN_HW and
TCA_CLS_FLAGS_IN_HW are not taken into account.

Fixes: 24d3dc6d27 ("net/sched: cls_u32: Reflect HW offload status")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-08 15:27:58 -05:00
..
Kconfig net/sched: kconfig: Remove blank help texts 2018-01-31 10:26:30 -05:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
act_api.c net_sched: remove unused parameter from act cleanup ops 2017-12-05 18:07:58 -05:00
act_bpf.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_connmark.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_csum.c net/sched: act_csum: don't use spinlock in the fast path 2018-01-23 19:51:46 -05:00
act_gact.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
act_ife.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_ipt.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_meta_mark.c net: remove duplicate includes 2017-12-13 13:18:46 -05:00
act_meta_skbprio.c net sched actions: change IFE modules alias names 2017-10-12 22:13:20 -07:00
act_meta_skbtcindex.c net: remove duplicate includes 2017-12-13 13:18:46 -05:00
act_mirred.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
act_nat.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_pedit.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_police.c net: sch: api: add extack support in qdisc_get_rtab 2017-12-21 12:32:50 -05:00
act_sample.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_simple.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_skbedit.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_skbmod.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_tunnel_key.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
act_vlan.c net_sched: switch to exit_batch for action pernet ops 2017-12-13 13:58:41 -05:00
cls_api.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_basic.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_bpf.c cls_bpf: propagate extack to offload delete callback 2018-01-24 16:01:10 -05:00
cls_cgroup.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_flow.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_flower.c cls_flower: propagate extack to delete callback 2018-01-24 16:01:10 -05:00
cls_fw.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_matchall.c cls_matchall: propagate extack to delete callback 2018-01-24 16:01:10 -05:00
cls_route.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_rsvp.c
cls_rsvp.h net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_rsvp6.c
cls_tcindex.c net: sched: propagate extack to cls->destroy callbacks 2018-01-24 16:01:09 -05:00
cls_u32.c net/sched: cls_u32: fix cls_u32 on filter replace 2018-02-08 15:27:58 -05:00
em_canid.c
em_cmp.c
em_ipset.c netfilter: x_tables: move hook state into xt_action_param structure 2016-11-03 10:56:21 +01:00
em_meta.c net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
em_nbyte.c net: sched: em_nbyte: don't add the data offset twice 2018-01-24 14:52:40 -05:00
em_text.c
em_u32.c
ematch.c net: sched: ematch: obtain net pointer from blocks 2017-10-16 21:00:40 +01:00
sch_api.c net: sched: introduce ingress/egress block index attributes for qdisc 2018-01-17 14:53:57 -05:00
sch_atm.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_blackhole.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00
sch_cbq.c net: sch: sch_cbq: add extack support 2017-12-21 12:32:51 -05:00
sch_cbs.c net: sch: sch_cbs: add extack support 2017-12-21 12:32:51 -05:00
sch_choke.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_codel.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_drr.c net: sch: sch_drr: add extack support 2017-12-21 12:32:51 -05:00
sch_dsmark.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_fifo.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_fq.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_fq_codel.c net: sch: api: add extack support in tcf_block_get 2017-12-21 12:32:51 -05:00
sch_generic.c net_sched: implement ->change_tx_queue_len() for pfifo_fast 2018-01-29 12:42:15 -05:00
sch_gred.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_hfsc.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_hhf.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_htb.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_ingress.c net: sched: allow ingress and clsact qdiscs to share filter blocks 2018-01-17 14:53:57 -05:00
sch_mq.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_mqprio.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_multiq.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_netem.c sch_netem: Bug fixing in calculating Netem interval 2018-02-07 21:59:12 -05:00
sch_pie.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_plug.c net: sched: sch: add extack for change qdisc ops 2017-12-21 12:32:50 -05:00
sch_prio.c net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues 2018-01-18 21:11:31 -05:00
sch_qfq.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_red.c net: sched: red: don't reset the backlog on every stat dump 2018-01-17 14:29:32 -05:00
sch_sfb.c net: sch: api: add extack support in qdisc_create_dflt 2017-12-21 12:32:51 -05:00
sch_sfq.c net: sch: api: add extack support in tcf_block_get 2017-12-21 12:32:51 -05:00
sch_tbf.c net: create skb_gso_validate_mac_len() 2018-02-01 09:36:03 -05:00
sch_teql.c net: sched: sch: add extack for init callback 2017-12-21 12:32:50 -05:00