wire: use 26-bit lengths for inter-daemon messaging.

Fixes: #289
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-09-28 13:12:19 +09:30
committed by Christian Decker
parent 32631b4278
commit 3d316518fd
4 changed files with 37 additions and 22 deletions

View File

@@ -4,6 +4,11 @@
#include <ccan/io/io.h>
#include <ccan/short_types/short_types.h>
/* We don't allow > 64M msgs: enough for 483 64k failure msgs. */
#define WIRE_LEN_LIMIT (1 << 26)
typedef u32 wire_len_t;
/* Read message into *data, allocating off ctx. */
struct io_plan *io_read_wire_(struct io_conn *conn,
const tal_t *ctx,