diff options
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -63,9 +63,10 @@ struct wireguard_peer { struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_key[NOISE_PUBLIC_KEY_LEN], const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]); struct wireguard_peer * __must_check peer_get_maybe_zero(struct wireguard_peer *peer); -static inline void peer_get(struct wireguard_peer *peer) +static inline struct wireguard_peer *peer_get(struct wireguard_peer *peer) { kref_get(&peer->refcount); + return peer; } void peer_put(struct wireguard_peer *peer); void peer_remove(struct wireguard_peer *peer); |