From: Guillaume Nault Date: Fri, 25 Jun 2021 13:33:23 +0000 (+0200) Subject: gtp: reset mac_header after decap X-Git-Tag: v5.14-rc1~119^2~27^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2d898c8a523f44ee7b3eea608e81a6e2264579f;p=thirdparty%2Fkernel%2Flinux.git gtp: reset mac_header after decap For consistency with other L3 tunnel devices, reset the mac_header pointer after decapsulation. This makes the mac_header 0 bytes long, thus making it clear that this skb has no mac_header. Compile tested only. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller --- diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 1c9023d47e008..30e0a10595a16 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -201,6 +201,7 @@ static int gtp_rx(struct pdp_ctx *pctx, struct sk_buff *skb, * calculate the transport header. */ skb_reset_network_header(skb); + skb_reset_mac_header(skb); skb->dev = pctx->dev;