From 680256ab7a2c3c01f4853f34dfe0949451a7fab2 Mon Sep 17 00:00:00 2001 From: Ludvig Strigeus Date: Tue, 30 Oct 2018 00:31:15 +0100 Subject: [PATCH] Expose endpoint() field --- wireguard_proto.h | 1 + 1 file changed, 1 insertion(+) diff --git a/wireguard_proto.h b/wireguard_proto.h index 367951e..c046813 100644 --- a/wireguard_proto.h +++ b/wireguard_proto.h @@ -491,6 +491,7 @@ public: void AddPacketToPeerQueue_Locked(Packet *packet); bool IsPeerLocked() { return WG_IF_LOCKS_ENABLED_ELSE(mutex_.IsLocked(), true); } + const IpAddr &endpoint() const { return endpoint_; } private: static WgKeypair *CreateNewKeypair(bool is_initiator, const uint8 key[WG_HASH_LEN], uint32 send_key_id, const uint8 *extfield, size_t extfield_size); void WriteMacToPacket(const uint8 *data, MessageMacs *mac);