aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@noconroy.net>2020-05-18 22:28:57 +1000
committerMatt Dunwoodie <ncon@noconroy.net>2020-05-18 22:28:57 +1000
commit0d81fcaf8b3871deda6e03c461d9a5b5dfb33f81 (patch)
treed7a57e8d623b2e881ebc90c3209868fcdc9c097a
parentRestore Jason's original growwgdata function, still keep == NULL (diff)
downloadwireguard-openbsd-0d81fcaf8b3871deda6e03c461d9a5b5dfb33f81.tar.xz
wireguard-openbsd-0d81fcaf8b3871deda6e03c461d9a5b5dfb33f81.zip
Line up constants with Linux
-rw-r--r--src/if_wg.c8
-rw-r--r--src/wg_cookie.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/if_wg.c b/src/if_wg.c
index eeae3fc..a7518ee 100644
--- a/src/if_wg.c
+++ b/src/if_wg.c
@@ -50,13 +50,13 @@
#define DEFAULT_MTU 1420
#define MAX_STAGED_PKT 128
-#define MAX_QUEUED_PKT 512
+#define MAX_QUEUED_PKT 1024
#define MAX_QUEUED_PKT_MASK (MAX_QUEUED_PKT - 1)
-#define MAX_QUEUED_HANDSHAKES 256
+#define MAX_QUEUED_HANDSHAKES 4096
-#define HASHTABLE_PEER_SIZE (1 << 6)
-#define HASHTABLE_INDEX_SIZE (HASHTABLE_PEER_SIZE * 3)
+#define HASHTABLE_PEER_SIZE (1 << 11)
+#define HASHTABLE_INDEX_SIZE (1 << 13)
#define MAX_PEERS_PER_IFACE (1 << 20)
#define REKEY_TIMEOUT 5
diff --git a/src/wg_cookie.h b/src/wg_cookie.h
index 6df4db2..88cd00d 100644
--- a/src/wg_cookie.h
+++ b/src/wg_cookie.h
@@ -94,7 +94,7 @@
#define COOKIE_SECRET_LATENCY 5
/* Constants for initiation rate limiting */
-#define RATELIMIT_SIZE (1 << 10)
+#define RATELIMIT_SIZE (1 << 13)
#define RATELIMIT_SIZE_MAX (RATELIMIT_SIZE * 8)
#define NSEC_PER_SEC 1000000000LL
#define INITIATIONS_PER_SECOND 1