19 #include <openssl/rand.h> enum cookie_mac_state cookie_checker_validate_macs(vlib_main_t *vm, cookie_checker_t *cc, message_macs_t *cm, void *buf, size_t len, bool busy, ip4_address_t ip4, u16 udp_port)
struct cookie_macs message_macs_t
#define COOKIE_SECRET_SIZE
static void cookie_checker_make_cookie(vlib_main_t *vm, cookie_checker_t *, uint8_t[COOKIE_COOKIE_SIZE], ip4_address_t ip4, u16 udp_port)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static f64 vlib_time_now(vlib_main_t *vm)
uint8_t cp_mac1_last[COOKIE_MAC_SIZE]
#define clib_memcpy(d, s, n)
#define COOKIE_COOKIE_SIZE
static void cookie_precompute_key(uint8_t *, const uint8_t[COOKIE_INPUT_SIZE], const char *)
int blake2s_init_key(blake2s_state_t *S, size_t outlen, const void *key, size_t keylen)
#define COOKIE_MAC1_KEY_LABEL
static void cookie_macs_mac1(message_macs_t *, const void *, size_t, const uint8_t[COOKIE_KEY_SIZE])
uint8_t cp_mac1_key[COOKIE_KEY_SIZE]
#define COOKIE_COOKIE_KEY_LABEL
uint8_t mac1[COOKIE_MAC_SIZE]
void cookie_maker_init(cookie_maker_t *cp, const uint8_t key[COOKIE_INPUT_SIZE])
static bool wg_birthdate_has_expired(f64 birthday_seconds, f64 expiration_seconds)
#define COOKIE_SECRET_LATENCY
#define clib_memcmp(s1, s2, m1)
static void cookie_macs_mac2(message_macs_t *, const void *, size_t, const uint8_t[COOKIE_COOKIE_SIZE])
uint8_t mac2[COOKIE_MAC_SIZE]
void cookie_maker_mac(cookie_maker_t *cp, message_macs_t *cm, void *buf, size_t len)
uint8_t cc_cookie_key[COOKIE_KEY_SIZE]
uint8_t cp_cookie[COOKIE_COOKIE_SIZE]
int blake2s_final(blake2s_state_t *S, void *out, size_t outlen)
void cookie_checker_update(cookie_checker_t *cc, uint8_t key[COOKIE_INPUT_SIZE])
#define COOKIE_INPUT_SIZE
int blake2s_update(blake2s_state_t *S, const void *pin, size_t inlen)
vl_api_dhcp_client_state_t state
int blake2s_init(blake2s_state_t *S, size_t outlen)
uint8_t cp_cookie_key[COOKIE_KEY_SIZE]
uint8_t cc_mac1_key[COOKIE_KEY_SIZE]
#define COOKIE_SECRET_MAX_AGE
uint8_t cc_secret[COOKIE_SECRET_SIZE]