mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-11 10:04:28 +01:00
connectd: fix advertizing for Tor ports.
We were accidentally using the port that the tor service was connecting to, not the /torport the user said to use. Fixes: #4597 Reported-by: @openoms Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: Config: `addr` autotor and statictor /torport arguments now advertized correctly.
This commit is contained in:
@@ -125,8 +125,11 @@ struct wireaddr_internal {
|
||||
/* ADDR_INTERNAL_AUTOTOR
|
||||
* ADDR_INTERNAL_STATICTOR */
|
||||
struct torservice {
|
||||
/* Where to connect to Tor proxy */
|
||||
struct wireaddr address;
|
||||
/* Tor port to use */
|
||||
u16 port;
|
||||
/* Blob to use to create tor service */
|
||||
u8 blob[TOR_V3_BLOBLEN + 1];
|
||||
} torservice;
|
||||
/* ADDR_INTERNAL_FORPROXY */
|
||||
|
||||
@@ -183,7 +183,7 @@ static struct wireaddr *make_fixed_onion(const tal_t *ctx,
|
||||
|
||||
name = tal_fmt(tmpctx, "%s.onion", line);
|
||||
onion = tal(ctx, struct wireaddr);
|
||||
if (!parse_wireaddr(name, onion, local->port, false, NULL))
|
||||
if (!parse_wireaddr(name, onion, port, false, NULL))
|
||||
status_failed(STATUS_FAIL_INTERNAL_ERROR,
|
||||
"Tor gave bad onion name '%s'", name);
|
||||
#ifdef SUPERVERBOSE
|
||||
|
||||
Reference in New Issue
Block a user