summaryrefslogtreecommitdiffstats
path: root/src/receive.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-20 02:17:15 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-20 02:17:15 +0100
commitc6cce0f5aac6640d5946c7ba7a258a04deac9423 (patch)
treed3ecc15e3de49b4e8327f4c5b3e5272c2119a4ea /src/receive.c
parentb5112ff67f3dd5bb263f5ca6283f170906acaab6 (diff)
downloadfastd-c6cce0f5aac6640d5946c7ba7a258a04deac9423.tar
fastd-c6cce0f5aac6640d5946c7ba7a258a04deac9423.zip
Replace max_packet_size functions by a max_overhead field
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/receive.c b/src/receive.c
index 9bf127d..39ede66 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -145,7 +145,7 @@ static inline void handle_socket_receive(fastd_context_t *ctx, fastd_socket_t *s
}
void fastd_receive(fastd_context_t *ctx, fastd_socket_t *sock) {
- size_t max_len = PACKET_TYPE_LEN + ctx->conf->max_packet_size;
+ size_t max_len = fastd_max_outer_packet(ctx);
fastd_buffer_t buffer = fastd_buffer_alloc(ctx, max_len, ctx->conf->min_decrypt_head_space, ctx->conf->min_decrypt_tail_space);
fastd_peer_address_t local_addr;
fastd_peer_address_t recvaddr;