]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Discard frames from unused ports
authorAndrew Lunn <andrew@lunn.ch>
Sat, 7 Apr 2018 18:37:40 +0000 (20:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Apr 2018 14:34:49 +0000 (10:34 -0400)
commitce2cc352d7fd668ee9ac022bcd4a70f4b714f1c1
treed78a133561ac517c10aae6b2baa1d505388fd6df
parent27101c179b5332cbffb6dae062fb0614e0e3f786
net: dsa: Discard frames from unused ports

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.

Reported-by: Chris Healy <cphealy@gmail.com>
Fixes: 676811fd1972 ("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>
net/dsa/dsa_priv.h