gtp: reset mac_header after decap
authorGuillaume Nault <gnault@redhat.com>
Fri, 25 Jun 2021 13:33:23 +0000 (15:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 19:44:17 +0000 (12:44 -0700)
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 <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gtp.c

index 1c9023d..30e0a10 100644 (file)
@@ -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;