From 740319127f14793a13ad385e8150cd98c715c20c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 20 Feb 2018 02:23:08 +0100 Subject: queueing: skb_reset: mark as xnet This was avoided for a long time, because I wanted the packet to be charged to the original socket for as long as possible. However, this broke net_cls, which looks at skb->sk for additional late-stage routing decisions. So we had no choice but to ensure that skb->sk is NULL by the time of xmit, and this means calling the skb destructor. --- src/queueing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queueing.h b/src/queueing.h index de8b7b2..d5948f3 100644 --- a/src/queueing.h +++ b/src/queueing.h @@ -63,7 +63,7 @@ static inline __be16 skb_examine_untrusted_ip_hdr(struct sk_buff *skb) static inline void skb_reset(struct sk_buff *skb) { - skb_scrub_packet(skb, false); + skb_scrub_packet(skb, true); memset(&skb->headers_start, 0, offsetof(struct sk_buff, headers_end) - offsetof(struct sk_buff, headers_start)); skb->queue_mapping = 0; skb->nohdr = 0; -- cgit v1.2.3-59-g8ed1b