aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/queueing.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 16:44:43 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-13 16:58:53 +0200
commit66589bcc02fd175ea43f4779df92aa4d4965e5c7 (patch)
tree291b207cd3f61b5d7ee3739493cbfb218b8e15f9 /src/queueing.h
parentchacha20poly1305: make gcc 8.1 happy (diff)
downloadwireguard-monolithic-historical-66589bcc02fd175ea43f4779df92aa4d4965e5c7.tar.xz
wireguard-monolithic-historical-66589bcc02fd175ea43f4779df92aa4d4965e5c7.zip
queueing: preserve pfmemalloc header bit
Diffstat (limited to 'src/queueing.h')
-rw-r--r--src/queueing.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/queueing.h b/src/queueing.h
index c507536..0057cfa 100644
--- a/src/queueing.h
+++ b/src/queueing.h
@@ -64,8 +64,10 @@ static inline __be16 skb_examine_untrusted_ip_hdr(struct sk_buff *skb)
static inline void skb_reset(struct sk_buff *skb)
{
+ const int pfmemalloc = skb->pfmemalloc;
skb_scrub_packet(skb, true);
memset(&skb->headers_start, 0, offsetof(struct sk_buff, headers_end) - offsetof(struct sk_buff, headers_start));
+ skb->pfmemalloc = pfmemalloc;
skb->queue_mapping = 0;
skb->nohdr = 0;
skb->peeked = 0;