---
name: "skb_scrub_packet"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/skb_scrub_packet"
---

# skb\_scrub\_packet(9)

scrub an skb

## 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.

## COPYRIGHT
