Skip to content
Commit 87cdf314 authored by Yossi Kuperman's avatar Yossi Kuperman Committed by Steffen Klassert
Browse files

xfrm: Verify MAC header exists before overwriting eth_hdr(skb)->h_proto

Artem Savkov reported that commit 5efec5c6 leads to a packet loss under
IPSec configuration. It appears that his setup consists of a TUN device,
which does not have a MAC header.

Make sure MAC header exists.

Note: TUN device sets a MAC header pointer, although it does not have one.

Fixes: 5efec5c6

 ("xfrm: Fix eth_hdr(skb)->h_proto to reflect inner IP version")
Reported-by: default avatarArtem Savkov <artem.savkov@gmail.com>
Tested-by: default avatarArtem Savkov <artem.savkov@gmail.com>
Signed-off-by: default avatarYossi Kuperman <yossiku@mellanox.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent b8b549ee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment