aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-06-01 12:49:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-06-01 15:27:11 +0200
commitb4a0f872e652a53c0005c135d7f98d416628804d (patch)
tree574df5ba55c776c4870399688e8096125ff3bfd7
parentif_wg: add braces for 12.1 compiler warning (diff)
downloadwireguard-freebsd-b4a0f872e652a53c0005c135d7f98d416628804d.tar.xz
wireguard-freebsd-b4a0f872e652a53c0005c135d7f98d416628804d.zip
compat: account for lack of CSUM_SND_TAG on ≤12.2
This was added to 12.1 in a security fix, but wasn't really wired up properly, so this effectively disables it from packet resetting, which is a bummer, but it's more preferable than hacking this in bad ways. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/compat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index 00ab0d83638e..575b44d2d8d5 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -98,4 +98,9 @@ static inline uint32_t arc4random_uniform(uint32_t bound)
}
typedef void callout_func_t(void *);
+
+#ifndef CSUM_SND_TAG
+#define CSUM_SND_TAG 0x80000000
+#endif
+
#endif