mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
When parsing foo.exit, if foo is unknown, and we are leaving circuits unattached, set the chosen_exit field and leave the address empty
svn:r5504
This commit is contained in:
@@ -1002,9 +1002,10 @@ connection_ap_handshake_process_socks(connection_t *conn)
|
||||
}
|
||||
} else {
|
||||
struct in_addr in;
|
||||
routerinfo_t *r = router_get_by_nickname(socks->address, 1);
|
||||
conn->chosen_exit_name = socks->address;
|
||||
*socks->address = 0;
|
||||
routerinfo_t *r = router_get_by_nickname(conn->chosen_exit_name, 1);
|
||||
if (r) {
|
||||
conn->chosen_exit_name = tor_strdup(socks->address);
|
||||
/* XXXX Should this use server->address instead? */
|
||||
in.s_addr = htonl(r->addr);
|
||||
strlcpy(socks->address, inet_ntoa(in), sizeof(socks->address));
|
||||
|
||||
Reference in New Issue
Block a user