aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/levin_base.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2020-12-29 19:58:53 -0500
committerLee Clagett <code@leeclagett.com>2020-12-17 00:36:10 +0000
commit61b6e4cc67abd61a0dbffe271ee3f355b2e772bc (patch)
treeaa63b9684b9138a6f58f18678307d353aec67c10 /contrib/epee/include/net/levin_base.h
parentMerge pull request #7221 (diff)
downloadmonero-61b6e4cc67abd61a0dbffe271ee3f355b2e772bc.tar.xz
Add aggressive restrictions to pre-handshake p2p buffer limit
Diffstat (limited to 'contrib/epee/include/net/levin_base.h')
-rw-r--r--contrib/epee/include/net/levin_base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/epee/include/net/levin_base.h b/contrib/epee/include/net/levin_base.h
index ad561c5b6..fce6d4b7e 100644
--- a/contrib/epee/include/net/levin_base.h
+++ b/contrib/epee/include/net/levin_base.h
@@ -72,7 +72,8 @@ namespace levin
#define LEVIN_DEFAULT_TIMEOUT_PRECONFIGURED 0
-#define LEVIN_DEFAULT_MAX_PACKET_SIZE 100000000 //100MB by default
+#define LEVIN_INITIAL_MAX_PACKET_SIZE 256*1024 // 256 KiB before handshake
+#define LEVIN_DEFAULT_MAX_PACKET_SIZE 100000000 //100MB by default after handshake
#define LEVIN_PACKET_REQUEST 0x00000001
#define LEVIN_PACKET_RESPONSE 0x00000002