linux-stable/net/hsr
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
..
hsr_debugfs.c /net/hsr: fix misspellings using codespell tool 2021-03-18 19:13:41 -07:00
hsr_device.c net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_device.h net: hsr: add offloading support 2021-02-11 13:24:44 -08:00
hsr_forward.c net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c net: hsr: add support for EntryForgetTime 2021-02-25 09:41:51 -08:00
hsr_framereg.h net: hsr: add support for EntryForgetTime 2021-02-25 09:41:51 -08:00
hsr_main.c net: hsr: add offloading support 2021-02-11 13:24:44 -08:00
hsr_main.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_netlink.c genetlink: move to smaller ops wherever possible 2020-10-02 19:11:11 -07:00
hsr_netlink.h hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hsr_slave.c net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_slave.h net: prp: add packet handling support 2020-07-27 12:20:40 -07:00
Kconfig hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00