aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-01-13 05:25:46 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-01-13 05:25:46 +0100
commit2a348e4c945502204125d0519b55433b7d41853c (patch)
tree3dde14fdc784238b1a22adcf3784af5f4122c49c /src/noise.c
parentconfig: useless newline (diff)
downloadwireguard-monolithic-historical-2a348e4c945502204125d0519b55433b7d41853c.tar.xz
wireguard-monolithic-historical-2a348e4c945502204125d0519b55433b7d41853c.zip
Use __read_mostly attribute when possible
Diffstat (limited to 'src/noise.c')
-rw-r--r--src/noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/noise.c b/src/noise.c
index 9555e58..0ffffd7 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -24,8 +24,8 @@
static const u8 handshake_name[33] = "Noise_IK_25519_ChaChaPoly_BLAKE2s";
static const u8 handshake_psk_name[36] = "NoisePSK_IK_25519_ChaChaPoly_BLAKE2s";
-static u8 handshake_name_hash[NOISE_HASH_LEN];
-static u8 handshake_psk_name_hash[NOISE_HASH_LEN];
+static u8 handshake_name_hash[NOISE_HASH_LEN] __read_mostly;
+static u8 handshake_psk_name_hash[NOISE_HASH_LEN] __read_mostly;
static const u8 identifier_name[34] = "WireGuard v0 zx2c4 Jason@zx2c4.com";
static atomic64_t keypair_counter = ATOMIC64_INIT(0);