From 7900318216b15a93235ae3113c4de0daa390f339 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 10 May 2018 08:48:24 +0930 Subject: [PATCH] wireaddr: fix tor address lengths. This variable does NOT include the 2 bytes for the port. Signed-off-by: Rusty Russell --- common/wireaddr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/wireaddr.h b/common/wireaddr.h index 2c71b0874..5a62b7bc3 100644 --- a/common/wireaddr.h +++ b/common/wireaddr.h @@ -31,9 +31,9 @@ struct sockaddr_un; * where `checksum = sha3(".onion checksum" | pubkey || version)[:2]` */ -#define TOR_V2_ADDRLEN 12 -#define TOR_V3_ADDRLEN 37 -#define LARGEST_ADDRLEN 37 +#define TOR_V2_ADDRLEN 10 +#define TOR_V3_ADDRLEN 35 +#define LARGEST_ADDRLEN TOR_V3_ADDRLEN enum wire_addr_type { ADDR_TYPE_PADDING = 0,