gossipd: don't try to reach tor if we don't have a proxy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-05-10 08:48:23 +09:30
parent 11db7ca9e6
commit e229f113b9
1 changed files with 3 additions and 0 deletions

View File

@ -2075,6 +2075,9 @@ static void try_reach_peer(struct daemon *daemon, const struct pubkey *id,
switch (a->addr.u.wireaddr.type) {
case ADDR_TYPE_TOR_V2:
case ADDR_TYPE_TOR_V3:
if (!daemon->tor_proxyaddr)
break;
/* fall thru */
case ADDR_TYPE_IPV4:
af = AF_INET;
break;