linux-stable/net
George McCollister 48b491a5cc net: hsr: fix mac_len checks
Commit 2e9f60932a ("net: hsr: check skb can contain struct hsr_ethhdr
in fill_frame_info") added the following which resulted in -EINVAL
always being returned:
	if (skb->mac_len < sizeof(struct hsr_ethhdr))
		return -EINVAL;

mac_len was not being set correctly so this check completely broke
HSR/PRP since it was always 14, not 20.

Set mac_len correctly and modify the mac_len checks to test in the
correct places since sometimes it is legitimately 14.

Fixes: 2e9f60932a ("net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info")
Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-24 14:10:28 -07:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth
bpf
bpfilter
bridge
caif
can
ceph
core net: sched: fix tx action reschedule issue with stopped queue 2021-05-14 15:05:46 -07:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
ethtool ethtool: stats: Fix a copy-paste error 2021-05-19 11:57:33 -07:00
hsr net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
ieee802154
ife
ipv4
ipv6 ipv6: record frag_max_size in atomic fragments in input path 2021-05-21 15:02:25 -07:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
mptcp
ncsi
netfilter
netlabel
netlink netlink: disable IRQs for netlink_lock_table() 2021-05-17 15:31:03 -07:00
netrom
nfc NFC: nci: fix memory leak in nci_allocate_device 2021-05-17 13:56:29 -07:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds RDS tcp loopback connection can hang 2021-05-21 14:46:59 -07:00
rfkill
rose
rxrpc
sched sch_dsmark: fix a NULL deref in qdisc_reset() 2021-05-24 13:11:44 -07:00
sctp
smc net/smc: remove device from smcd_dev_list after failed device_add() 2021-05-17 15:27:22 -07:00
strparser
sunrpc
switchdev
tipc tipc: simplify the finalize work queue 2021-05-18 13:22:09 -07:00
tls tls splice: check SPLICE_F_NONBLOCK instead of MSG_DONTWAIT 2021-05-14 15:03:25 -07:00
unix
vmw_vsock
wireless
x25
xdp
xfrm
compat.c
devres.c
Kconfig
Makefile
socket.c
sysctl_net.c