linux-uconsole/net/hsr
Taehee Yoo eaf7b9d12a hsr: reset network header when supervision frame is created
commit 3ed0a1d563 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17 19:47:00 +01:00
..
hsr_device.c hsr: reset network header when supervision frame is created 2020-01-17 19:47:00 +01:00
hsr_device.h net/hsr: Added support for HSR v1 2016-04-15 17:06:48 -04:00
hsr_forward.c hsr: fix incorrect warning 2017-06-12 15:21:20 -04:00
hsr_forward.h
hsr_framereg.c net: hsr: fix memory leak in hsr_dev_finalize() 2019-03-19 13:12:38 +01:00
hsr_framereg.h net: hsr: fix memory leak in hsr_dev_finalize() 2019-03-19 13:12:38 +01:00
hsr_main.c
hsr_main.h net/hsr: Added support for HSR v1 2016-04-15 17:06:48 -04:00
hsr_netlink.c net: add netlink_ext_ack argument to rtnl_link_ops.newlink 2017-06-26 23:13:21 -04:00
hsr_netlink.h
hsr_slave.c net-next: treewide use is_vlan_dev() helper function. 2017-02-06 16:33:29 -05:00
hsr_slave.h
Kconfig net/hsr: Added support for HSR v1 2016-04-15 17:06:48 -04:00
Makefile