diff options
| author | Ingo Molnar <mingo@kernel.org> | 2020-05-28 07:58:12 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2020-05-28 07:58:12 +0200 |
| commit | 0bffedbce90818228f554651baf8d7c75f2876d8 (patch) | |
| tree | 96101208e0200c70c6688737ac6596bdd0ed2950 /drivers/net/wireguard/queueing.h | |
| parent | c50c75e9b87946499a62bffc021e95c87a1d57cd (diff) | |
| parent | 9cb1fd0efd195590b828b9b865421ad345a4a145 (diff) | |
Merge tag 'v5.7-rc7' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/wireguard/queueing.h')
| -rw-r--r-- | drivers/net/wireguard/queueing.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireguard/queueing.h b/drivers/net/wireguard/queueing.h index 3432232afe06..c58df439dbbe 100644 --- a/drivers/net/wireguard/queueing.h +++ b/drivers/net/wireguard/queueing.h @@ -87,12 +87,20 @@ static inline bool wg_check_packet_protocol(struct sk_buff *skb) return real_protocol && skb->protocol == real_protocol; } -static inline void wg_reset_packet(struct sk_buff *skb) +static inline void wg_reset_packet(struct sk_buff *skb, bool encapsulating) { + u8 l4_hash = skb->l4_hash; + u8 sw_hash = skb->sw_hash; + u32 hash = skb->hash; skb_scrub_packet(skb, true); memset(&skb->headers_start, 0, offsetof(struct sk_buff, headers_end) - offsetof(struct sk_buff, headers_start)); + if (encapsulating) { + skb->l4_hash = l4_hash; + skb->sw_hash = sw_hash; + skb->hash = hash; + } skb->queue_mapping = 0; skb->nohdr = 0; skb->peeked = 0; |
