• Home
  • Raw
  • Download

Lines Matching refs:latest_cookie

63 	precompute_key(peer->latest_cookie.cookie_decryption_key,  in wg_cookie_checker_precompute_peer_keys()
65 precompute_key(peer->latest_cookie.message_mac1_key, in wg_cookie_checker_precompute_peer_keys()
162 down_write(&peer->latest_cookie.lock); in wg_cookie_add_mac_to_packet()
164 peer->latest_cookie.message_mac1_key); in wg_cookie_add_mac_to_packet()
165 memcpy(peer->latest_cookie.last_mac1_sent, macs->mac1, COOKIE_LEN); in wg_cookie_add_mac_to_packet()
166 peer->latest_cookie.have_sent_mac1 = true; in wg_cookie_add_mac_to_packet()
167 up_write(&peer->latest_cookie.lock); in wg_cookie_add_mac_to_packet()
169 down_read(&peer->latest_cookie.lock); in wg_cookie_add_mac_to_packet()
170 if (peer->latest_cookie.is_valid && in wg_cookie_add_mac_to_packet()
171 !wg_birthdate_has_expired(peer->latest_cookie.birthdate, in wg_cookie_add_mac_to_packet()
174 peer->latest_cookie.cookie); in wg_cookie_add_mac_to_packet()
177 up_read(&peer->latest_cookie.lock); in wg_cookie_add_mac_to_packet()
211 down_read(&peer->latest_cookie.lock); in wg_cookie_message_consume()
212 if (unlikely(!peer->latest_cookie.have_sent_mac1)) { in wg_cookie_message_consume()
213 up_read(&peer->latest_cookie.lock); in wg_cookie_message_consume()
218 peer->latest_cookie.last_mac1_sent, COOKIE_LEN, src->nonce, in wg_cookie_message_consume()
219 peer->latest_cookie.cookie_decryption_key); in wg_cookie_message_consume()
220 up_read(&peer->latest_cookie.lock); in wg_cookie_message_consume()
223 down_write(&peer->latest_cookie.lock); in wg_cookie_message_consume()
224 memcpy(peer->latest_cookie.cookie, cookie, COOKIE_LEN); in wg_cookie_message_consume()
225 peer->latest_cookie.birthdate = ktime_get_coarse_boottime_ns(); in wg_cookie_message_consume()
226 peer->latest_cookie.is_valid = true; in wg_cookie_message_consume()
227 peer->latest_cookie.have_sent_mac1 = false; in wg_cookie_message_consume()
228 up_write(&peer->latest_cookie.lock); in wg_cookie_message_consume()