WSL2-Linux-Kernel/net/dsa
Andrew Lunn 30593709f8 net: dsa: Discard frames from unused ports
commit fc5f33768c upstream.

The Marvell switches under some conditions will pass a frame to the
host with the port being the CPU port. Such frames are invalid, and
should be dropped. Not dropping them can result in a crash when
incrementing the receive statistics for an invalid port.

This has been reworked for 4.14, which does not have the central
dsa_master_find_slave() function, so each tag driver needs to check.

Reported-by: Chris Healy <cphealy@gmail.com>
Fixes: 91da11f870 ("net: Distributed Switch Architecture protocol support")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:36:39 +02:00
..
Kconfig dsa: add support for Microchip KSZ tail tagging 2017-05-31 20:56:31 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
dsa2.c net: dsa: check master device before put 2017-10-25 10:49:14 +09:00
dsa_priv.h net-next: dsa: move struct dsa_device_ops to the global header file 2017-08-09 22:51:47 -07:00
legacy.c net: dsa: Move FDB add/del implementation inside DSA 2017-08-07 14:48:48 -07:00
port.c net: dsa: Move FDB dump implementation inside DSA 2017-08-07 14:48:48 -07:00
slave.c net: dsa: Fix network device registration order 2017-09-28 10:12:53 -07:00
switch.c net: dsa: return after vlan prepare phase 2017-11-11 15:45:09 +09:00
tag_brcm.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_dsa.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_edsa.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_ksz.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_lan9303.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_mtk.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_qca.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00
tag_trailer.c net: dsa: Discard frames from unused ports 2018-04-24 09:36:39 +02:00