linux-stable/net/dsa
Vladimir Oltean 7c762e70c5 net: dsa: flood multicast to CPU when slave has IFF_PROMISC
Certain DSA switches can eliminate flooding to the CPU when none of the
ports have the IFF_ALLMULTI or IFF_PROMISC flags set. This is done by
synthesizing a call to dsa_port_bridge_flags() for the CPU port, a call
which normally comes from the bridge driver via switchdev.

The bridge port flags and IFF_PROMISC|IFF_ALLMULTI have slightly
different semantics, and due to inattention/lack of proper testing, the
IFF_PROMISC flag allows unknown unicast to be flooded to the CPU, but
not unknown multicast.

This must be fixed by setting both BR_FLOOD (unicast) and BR_MCAST_FLOOD
in the synthesized dsa_port_bridge_flags() call, since IFF_PROMISC means
that packets should not be filtered regardless of their MAC DA.

Fixes: 7569459a52 ("net: dsa: manage flooding on the CPU ports")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-04-25 11:46:24 +01:00
..
Kconfig net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag 2021-10-18 14:02:56 +01:00
Makefile net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag 2021-10-18 14:02:56 +01:00
dsa.c net: dsa: felix: avoid early deletion of host FDB entries 2022-03-09 11:12:10 +00:00
dsa2.c Revert "net: dsa: setup master before ports" 2022-04-13 12:38:06 +01:00
dsa_priv.h net: dsa: Handle MST state changes 2022-03-17 16:49:59 -07:00
master.c Revert "net: dsa: stop updating master MTU from master.c" 2022-04-01 11:59:01 +01:00
port.c net: dsa: Add missing of_node_put() in dsa_port_link_register_of 2022-04-22 13:06:58 +01:00
slave.c net: dsa: flood multicast to CPU when slave has IFF_PROMISC 2022-04-25 11:46:24 +01:00
switch.c net: dsa: felix: avoid early deletion of host FDB entries 2022-03-09 11:12:10 +00:00
tag_8021q.c net: dsa: tag_8021q: rename dsa_8021q_bridge_tx_fwd_offload_vid 2022-02-27 11:06:14 +00:00
tag_ar9331.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_brcm.c net: dsa: create a helper for locating EtherType DSA headers on RX 2021-08-11 14:44:58 +01:00
tag_dsa.c net: dsa: tag_dsa: Fix tx from VLAN uppers on non-filtering bridges 2022-03-08 11:12:28 +01:00
tag_gswip.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_hellcreek.c net: dsa: hellcreek: Calculate checksums in tagger 2022-04-19 09:49:38 +02:00
tag_ksz.c net/dsa/tag_ksz.c: remove superfluous headers 2021-09-29 11:38:21 +01:00
tag_lan9303.c net: dsa: lan9303: handle hwaccel VLAN tags 2022-02-17 09:32:06 -08:00
tag_mtk.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_ocelot.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-23 16:09:58 -08:00
tag_ocelot_8021q.c net: dsa: tag_8021q: merge RX and TX VLANs 2022-02-27 11:06:14 +00:00
tag_qca.c net: dsa: tag_qca: add support for handling mgmt and MIB Ethernet packet 2022-02-02 14:43:59 +00:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: Drop bit 9 from egress frames 2021-09-14 19:34:03 -07:00
tag_rtl8_4.c net: dsa: tag_rtl8_4: fix typo in modalias name 2022-03-09 20:36:24 -08:00
tag_sja1105.c net: dsa: tag_8021q: rename dsa_8021q_bridge_tx_fwd_offload_vid 2022-02-27 11:06:14 +00:00
tag_trailer.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_xrs700x.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00