Skip to content

Commit

Permalink
gtp: reset mac_header after decap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guillaume Nault authored and David S. Miller committed Jun 28, 2021
1 parent da5a2e4 commit b2d898c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/gtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b2d898c

Please sign in to comment.