summaryrefslogtreecommitdiffhomepage
path: root/src/receive.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-11-05 01:28:11 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-05 01:29:00 +0100
commit30322cc25c31a20503d8a162a95eeff3baa44416 (patch)
tree160b197713d50eb2ce962ff19f09de8c2c3fc84f /src/receive.c
parent70210e26b4ba3a6ed0e74e8d5794b41431466d7d (diff)
compat: csum_levels is new in 3.18 but backported to RHEL
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/receive.c b/src/receive.c
index 81140e9..5417ab9 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -386,7 +386,9 @@ static void wg_packet_consume_data_done(struct wg_peer *peer,
* again in software.
*/
skb->ip_summed = CHECKSUM_UNNECESSARY;
+#ifndef COMPAT_CANNOT_USE_CSUM_LEVEL
skb->csum_level = ~0; /* All levels */
+#endif
skb->protocol = wg_skb_examine_untrusted_ip_hdr(skb);
if (skb->protocol == htons(ETH_P_IP)) {
len = ntohs(ip_hdr(skb)->tot_len);