-
- Downloads
net: hsr: fix mac_len checks
Commit 2e9f6093 ("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: 2e9f6093 ("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>
Showing
- net/hsr/hsr_device.c 2 additions, 0 deletionsnet/hsr/hsr_device.c
- net/hsr/hsr_forward.c 21 additions, 9 deletionsnet/hsr/hsr_forward.c
- net/hsr/hsr_forward.h 4 additions, 4 deletionsnet/hsr/hsr_forward.h
- net/hsr/hsr_main.h 2 additions, 2 deletionsnet/hsr/hsr_main.h
- net/hsr/hsr_slave.c 5 additions, 6 deletionsnet/hsr/hsr_slave.c
Loading
Please register or sign in to comment