Lines Matching refs:peer
36 struct wg_peer *peer; in wg_open() local
54 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open()
55 wg_packet_send_staged_packets(peer); in wg_open()
56 if (peer->persistent_keepalive_interval) in wg_open()
57 wg_packet_send_keepalive(peer); in wg_open()
67 struct wg_peer *peer; in wg_pm_notification() local
83 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_pm_notification()
84 del_timer(&peer->timer_zero_key_material); in wg_pm_notification()
85 wg_noise_handshake_clear(&peer->handshake); in wg_pm_notification()
86 wg_noise_keypairs_clear(&peer->keypairs); in wg_pm_notification()
100 struct wg_peer *peer; in wg_vm_notification() local
105 list_for_each_entry(peer, &wg->peer_list, peer_list) in wg_vm_notification()
106 wg_noise_expire_current_peer_keypairs(peer); in wg_vm_notification()
118 struct wg_peer *peer; in wg_stop() local
122 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_stop()
123 wg_packet_purge_staged_packets(peer); in wg_stop()
124 wg_timers_stop(peer); in wg_stop()
125 wg_noise_handshake_clear(&peer->handshake); in wg_stop()
126 wg_noise_keypairs_clear(&peer->keypairs); in wg_stop()
127 wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); in wg_stop()
141 struct wg_peer *peer; in wg_xmit() local
153 peer = wg_allowedips_lookup_dst(&wg->peer_allowedips, skb); in wg_xmit()
154 if (unlikely(!peer)) { in wg_xmit()
165 family = READ_ONCE(peer->endpoint.addr.sa_family); in wg_xmit()
169 dev->name, peer->internal_id); in wg_xmit()
206 spin_lock_bh(&peer->staged_packet_queue.lock); in wg_xmit()
211 while (skb_queue_len(&peer->staged_packet_queue) > MAX_STAGED_PACKETS) { in wg_xmit()
212 dev_kfree_skb(__skb_dequeue(&peer->staged_packet_queue)); in wg_xmit()
215 skb_queue_splice_tail(&packets, &peer->staged_packet_queue); in wg_xmit()
216 spin_unlock_bh(&peer->staged_packet_queue.lock); in wg_xmit()
218 wg_packet_send_staged_packets(peer); in wg_xmit()
220 wg_peer_put(peer); in wg_xmit()
224 wg_peer_put(peer); in wg_xmit()
412 struct wg_peer *peer; in wg_netns_pre_exit() local
422 list_for_each_entry(peer, &wg->peer_list, peer_list) in wg_netns_pre_exit()
423 wg_socket_clear_peer_endpoint_src(peer); in wg_netns_pre_exit()