summaryrefslogtreecommitdiffstatshomepage
path: root/src/peer.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-11-04 03:11:21 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-11-04 03:11:21 +0100
commit4db38d808daaa1a5ba79f87018a4e7240e1a331e (patch)
tree672cf583753233fae57052863126905c515fac36 /src/peer.h
parentchacha20poly1305: src is different from dst on last piece (diff)
downloadwireguard-linux-compat-4db38d808daaa1a5ba79f87018a4e7240e1a331e.tar.xz
wireguard-linux-compat-4db38d808daaa1a5ba79f87018a4e7240e1a331e.zip
socket: use dst_cache instead of handrolled cache
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/peer.h b/src/peer.h
index 994b523..c97d934 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -10,17 +10,14 @@
#include <linux/netfilter.h>
#include <linux/spinlock.h>
#include <linux/kref.h>
+#include <net/dst_cache.h>
struct wireguard_device;
struct wireguard_peer {
struct wireguard_device *device;
struct sockaddr_storage endpoint_addr;
- struct dst_entry *endpoint_dst;
- union {
- struct flowi4 fl4;
- struct flowi6 fl6;
- } endpoint_flow;
+ struct dst_cache endpoint_cache;
rwlock_t endpoint_lock;
struct noise_handshake handshake;
struct noise_keypairs keypairs;