summaryrefslogtreecommitdiffhomepage
path: root/src/uapi.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-08-07 20:45:42 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-08-08 05:57:25 +0200
commit5f645927224801171ec043e2f6a2ed7b3998cdc2 (patch)
treefd9e286ed7c155e91e6ec8b3ce04fd22da4f0e38 /src/uapi.h
parent0aaeecab435c4d89a67e58db729c7acfef4c0e5a (diff)
hashtables: allow up to 2^{20} peers per interface
This allows for nearly 1 million peers per interface, which should be more than enough. If needed later, this number could easily be increased beyond this. We also increase the size of the hashtables to accommodate this upper bound. In the future, it might be smart to dynamically expand the hashtable instead of this hard coded compromise value between small systems and large systems. Ongoing work includes figuring out the most optimal scheme for these hashtables and for the insertion to mask their order from timing inference. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi.h')
-rw-r--r--src/uapi.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uapi.h b/src/uapi.h
index 1cc2bba..e699025 100644
--- a/src/uapi.h
+++ b/src/uapi.h
@@ -128,7 +128,7 @@ enum {
};
enum {
- WG_API_VERSION_MAGIC = 0xbeef0002
+ WG_API_VERSION_MAGIC = 0xbeef0003
};
struct wgdevice {
@@ -142,7 +142,7 @@ struct wgdevice {
__u16 port; /* Get/Set */
union {
- __u16 num_peers; /* Get/Set */
+ __u32 num_peers; /* Get/Set */
__u32 peers_size; /* Get */
};
};