linux/net/hsr
Taehee Yoo 3ed0a1d563 hsr: reset network header when supervision frame is created
The supervision frame is L2 frame.
When supervision frame is created, hsr module doesn't set network header.
If tap routine is enabled, dev_queue_xmit_nit() is called and it checks
network_header. If network_header pointer wasn't set(or invalid),
it resets network_header and warns.
In order to avoid unnecessary warning message, resetting network_header
is needed.

Test commands:
    ip netns add nst
    ip link add veth0 type veth peer name veth1
    ip link add veth2 type veth peer name veth3
    ip link set veth1 netns nst
    ip link set veth3 netns nst
    ip link set veth0 up
    ip link set veth2 up
    ip link add hsr0 type hsr slave1 veth0 slave2 veth2
    ip a a 192.168.100.1/24 dev hsr0
    ip link set hsr0 up
    ip netns exec nst ip link set veth1 up
    ip netns exec nst ip link set veth3 up
    ip netns exec nst ip link add hsr1 type hsr slave1 veth1 slave2 veth3
    ip netns exec nst ip a a 192.168.100.2/24 dev hsr1
    ip netns exec nst ip link set hsr1 up
    tcpdump -nei veth0

Splat looks like:
[  175.852292][    C3] protocol 88fb is buggy, dev veth0

Fixes: f421436a59 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-25 16:35:35 -08:00
..
hsr_debugfs.c hsr: rename debugfs file when interface name is changed 2019-12-25 16:35:35 -08:00
hsr_device.c hsr: reset network header when supervision frame is created 2019-12-25 16:35:35 -08:00
hsr_device.h hsr: switch ->dellink() to ->ndo_uninit() 2019-07-11 14:37:45 -07:00
hsr_forward.c net: hsr: add tx stats for master interface 2019-04-15 17:22:02 -07:00
hsr_forward.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
hsr_framereg.c hsr: fix a race condition in node list insertion and deletion 2019-12-25 16:35:35 -08:00
hsr_framereg.h hsr: fix a race condition in node list insertion and deletion 2019-12-25 16:35:35 -08:00
hsr_main.c hsr: fix a race condition in node list insertion and deletion 2019-12-25 16:35:35 -08:00
hsr_main.h hsr: fix a race condition in node list insertion and deletion 2019-12-25 16:35:35 -08:00
hsr_netlink.c hsr: add hsr root debugfs directory 2019-12-25 16:35:35 -08:00
hsr_netlink.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
hsr_slave.c hsr: fix a memory leak in hsr_del_port() 2019-07-05 15:22:27 -07:00
hsr_slave.h net: hsr: convert to SPDX identifier 2019-04-06 18:32:21 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00