mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
9d6803921a
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:
|
||
---|---|---|
.. | ||
hsr_debugfs.c | ||
hsr_device.c | ||
hsr_device.h | ||
hsr_forward.c | ||
hsr_forward.h | ||
hsr_framereg.c | ||
hsr_framereg.h | ||
hsr_main.c | ||
hsr_main.h | ||
hsr_netlink.c | ||
hsr_netlink.h | ||
hsr_slave.c | ||
hsr_slave.h | ||
Kconfig | ||
Makefile |