linux_dsm_epyc7002/net/hsr
Kurt Kanzenbach b82816d778 net: hsr: Reset MAC header for Tx path
commit 9d6803921a16f4d768dc41a75375629828f4d91e upstream.

Reset MAC header in HSR Tx path. This is needed, because direct packet
transmission, e.g. by specifying PACKET_QDISC_BYPASS does not reset the MAC
header.

This has been observed using the following setup:

|$ ip link add name hsr0 type hsr slave1 lan0 slave2 lan1 supervision 45 version 1
|$ ifconfig hsr0 up
|$ ./test hsr0

The test binary is using mmap'ed sockets and is specifying the
PACKET_QDISC_BYPASS socket option.

This patch resolves the following warning on a non-patched kernel:

|[  112.725394] ------------[ cut here ]------------
|[  112.731418] WARNING: CPU: 1 PID: 257 at net/hsr/hsr_forward.c:560 hsr_forward_skb+0x484/0x568
|[  112.739962] net/hsr/hsr_forward.c:560: Malformed frame (port_src hsr0)

The warning can be safely removed, because the other call sites of
hsr_forward_skb() make sure that the skb is prepared correctly.

Fixes: d346a3fae3 ("packet: introduce PACKET_QDISC_BYPASS socket option")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 08:42:02 +02:00
..
hsr_debugfs.c net: hsr: Convert to DEFINE_SHOW_ATTRIBUTE 2020-09-17 17:05:10 -07:00
hsr_device.c net: hsr: Reset MAC header for Tx path 2021-04-14 08:42:02 +02:00
hsr_device.h hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hsr_forward.c net: hsr: Reset MAC header for Tx path 2021-04-14 08:42:02 +02:00
hsr_forward.h net: prp: add packet handling support 2020-07-27 12:20:40 -07:00
hsr_framereg.c net: hsr: add support for EntryForgetTime 2021-03-07 12:34:07 +01:00
hsr_framereg.h net: hsr: add support for EntryForgetTime 2021-03-07 12:34:07 +01:00
hsr_main.c hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hsr_main.h net: hsr: add support for EntryForgetTime 2021-03-07 12:34:07 +01: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: prp: add packet handling support 2020-07-27 12:20:40 -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