diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-06-01 12:49:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-06-01 15:27:11 +0200 |
commit | b4a0f872e652a53c0005c135d7f98d416628804d (patch) | |
tree | 574df5ba55c776c4870399688e8096125ff3bfd7 /src/compat.h | |
parent | if_wg: add braces for 12.1 compiler warning (diff) | |
download | wireguard-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>
Diffstat (limited to 'src/compat.h')
-rw-r--r-- | src/compat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h index 00ab0d8..575b44d 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 |