aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-10-16 10:59:17 +0200
committerLinus Nordberg <linus@nordberg.se>2019-10-16 10:59:17 +0200
commiteefeab16c61832f471117599fa9c84bc08358b18 (patch)
treeb53e20f1c37d64f7fcc881d86bce2632a35ec089 /common.h
parentFix parsing issue with split messages (diff)
parent[server] Restore leases from allowedips at startup (diff)
downloadwg-dynamic-eefeab16c61832f471117599fa9c84bc08358b18.tar.xz
wg-dynamic-eefeab16c61832f471117599fa9c84bc08358b18.zip
Merge branch 'ln/devel' into HEAD
Diffstat (limited to 'common.h')
-rw-r--r--common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/common.h b/common.h
index 04df3cf..917dfe8 100644
--- a/common.h
+++ b/common.h
@@ -21,7 +21,7 @@
static const char WG_DYNAMIC_ADDR[] = "fe80::";
static const uint16_t WG_DYNAMIC_PORT = 970; /* ASCII sum of "wireguard" */
-#define WG_DYNAMIC_LEASETIME 10 /* NOTE: 10s is good for testing purposes */
+#define WG_DYNAMIC_DEFAULT_LEASETIME 3600
#define ITEMS \
E(WGKEY_UNKNOWN, "") /* must be the first entry */ \
@@ -62,6 +62,9 @@ static const char *const WG_DYNAMIC_ERR[] = { ITEMS };
struct wg_dynamic_request {
enum wg_dynamic_key cmd;
uint32_t version;
+ int fd;
+ wg_key pubkey;
+ struct in6_addr lladdr;
unsigned char *buf;
size_t len; /* <= MAX_LINESIZE */
void *result;