aboutsummaryrefslogtreecommitdiffstats
path: root/src/wg_cookie.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@noconroy.net>2021-04-23 12:00:08 +1000
committerMatt Dunwoodie <ncon@noconroy.net>2021-04-23 12:38:26 +1000
commit3959d1208317e772a560c05e44baad68708a68e7 (patch)
treef46108798e04644701edb7538fb9ce537cc280a0 /src/wg_cookie.h
parentwg_cookie: add cookie_valid bool (diff)
downloadwireguard-freebsd-3959d1208317e772a560c05e44baad68708a68e7.tar.xz
wireguard-freebsd-3959d1208317e772a560c05e44baad68708a68e7.zip
wg_cookie: cleanup internal code
The two main changes here are: * Remove cookie_ prefix from static functions. This is a leftover from OpenBSD where they don't want static functions. * Rename cm to macs, and cp to cm. Not sure where this came from but it didn't really make much sense to leave it as is. The reset are whitespace changes. Overall there is no modification to functionality here, just appearances. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
Diffstat (limited to '')
-rw-r--r--src/wg_cookie.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wg_cookie.h b/src/wg_cookie.h
index 3dc1977..a2e20f2 100644
--- a/src/wg_cookie.h
+++ b/src/wg_cookie.h
@@ -29,15 +29,15 @@ struct cookie_macs {
};
struct cookie_maker {
- uint8_t cp_mac1_key[COOKIE_KEY_SIZE];
- uint8_t cp_cookie_key[COOKIE_KEY_SIZE];
+ uint8_t cm_mac1_key[COOKIE_KEY_SIZE];
+ uint8_t cm_cookie_key[COOKIE_KEY_SIZE];
- struct rwlock cp_lock;
- bool cp_cookie_valid;
- uint8_t cp_cookie[COOKIE_COOKIE_SIZE];
- sbintime_t cp_cookie_birthdate; /* sbinuptime */
- bool cp_mac1_valid;
- uint8_t cp_mac1_last[COOKIE_MAC_SIZE];
+ struct rwlock cm_lock;
+ bool cm_cookie_valid;
+ uint8_t cm_cookie[COOKIE_COOKIE_SIZE];
+ sbintime_t cm_cookie_birthdate; /* sbinuptime */
+ bool cm_mac1_sent;
+ uint8_t cm_mac1_last[COOKIE_MAC_SIZE];
};
struct cookie_checker {