skb_scrub_packet
Prev | Socket Buffer Functions | Next

## Name

skb_scrub_packet — scrub an skb

## Synopsis

`void skb_scrub_packet (` | struct sk_buff * skb,
| bool xnet`)`;

## Arguments

`skb`

  buffer to clean

`xnet`

  packet is crossing netns

## Description

skb_scrub_packet can be used after encapsulating or decapsulting a packet into/from a tunnel. Some information have to be cleared during these operations. skb_scrub_packet can also be used to clean a skb before injecting it in another namespace (`xnet` == true). We have to clear all information in the skb that could impact namespace isolation.

Prev | Up | Next
skb_try_coalesce | Home | skb_gso_transport_seglen