Lines Matching full:peer

11 #include "peer.h"
34 struct wg_peer *peer; in wg_open() local
52 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open()
53 wg_packet_send_staged_packets(peer); in wg_open()
54 if (peer->persistent_keepalive_interval) in wg_open()
55 wg_packet_send_keepalive(peer); in wg_open()
67 struct wg_peer *peer; in wg_pm_notification() local
82 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_pm_notification()
83 del_timer(&peer->timer_zero_key_material); in wg_pm_notification()
84 wg_noise_handshake_clear(&peer->handshake); in wg_pm_notification()
85 wg_noise_keypairs_clear(&peer->keypairs); in wg_pm_notification()
100 struct wg_peer *peer; in wg_stop() local
103 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_stop()
104 wg_packet_purge_staged_packets(peer); in wg_stop()
105 wg_timers_stop(peer); in wg_stop()
106 wg_noise_handshake_clear(&peer->handshake); in wg_stop()
107 wg_noise_keypairs_clear(&peer->keypairs); in wg_stop()
108 wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); in wg_stop()
120 struct wg_peer *peer; in wg_xmit() local
132 peer = wg_allowedips_lookup_dst(&wg->peer_allowedips, skb); in wg_xmit()
133 if (unlikely(!peer)) { in wg_xmit()
136 net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI4\n", in wg_xmit()
139 net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI6\n", in wg_xmit()
144 family = READ_ONCE(peer->endpoint.addr.sa_family); in wg_xmit()
147 net_dbg_ratelimited("%s: No valid endpoint has been configured or discovered for peer %llu\n", in wg_xmit()
148 dev->name, peer->internal_id); in wg_xmit()
185 spin_lock_bh(&peer->staged_packet_queue.lock); in wg_xmit()
190 while (skb_queue_len(&peer->staged_packet_queue) > MAX_STAGED_PACKETS) { in wg_xmit()
191 dev_kfree_skb(__skb_dequeue(&peer->staged_packet_queue)); in wg_xmit()
194 skb_queue_splice_tail(&packets, &peer->staged_packet_queue); in wg_xmit()
195 spin_unlock_bh(&peer->staged_packet_queue.lock); in wg_xmit()
197 wg_packet_send_staged_packets(peer); in wg_xmit()
199 wg_peer_put(peer); in wg_xmit()
203 wg_peer_put(peer); in wg_xmit()