mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
scrub out some more references to the misnamed 'bridge' concept
svn:r10543
This commit is contained in:
parent
15270358eb
commit
eebeda2c71
3 changed files with 16 additions and 18 deletions
|
@ -357,7 +357,7 @@ connection_ap_expire_beginning(void)
|
||||||
if (c->type != CONN_TYPE_AP)
|
if (c->type != CONN_TYPE_AP)
|
||||||
continue;
|
continue;
|
||||||
conn = TO_EDGE_CONN(c);
|
conn = TO_EDGE_CONN(c);
|
||||||
/* if it's an internal bridge connection, don't yell its status. */
|
/* if it's an internal linked connection, don't yell its status. */
|
||||||
severity = (!conn->_base.addr && !conn->_base.port)
|
severity = (!conn->_base.addr && !conn->_base.port)
|
||||||
? LOG_INFO : LOG_NOTICE;
|
? LOG_INFO : LOG_NOTICE;
|
||||||
seconds_idle = now - conn->_base.timestamp_lastread;
|
seconds_idle = now - conn->_base.timestamp_lastread;
|
||||||
|
@ -1908,13 +1908,13 @@ connection_ap_handshake_send_resolve(edge_connection_t *ap_conn)
|
||||||
* DOCDOC start_reading
|
* DOCDOC start_reading
|
||||||
*/
|
*/
|
||||||
edge_connection_t *
|
edge_connection_t *
|
||||||
connection_ap_make_bridge(char *address, uint16_t port,
|
connection_ap_make_link(char *address, uint16_t port,
|
||||||
const char *digest, int command)
|
const char *digest, int command)
|
||||||
{
|
{
|
||||||
edge_connection_t *conn;
|
edge_connection_t *conn;
|
||||||
|
|
||||||
log_notice(LD_APP,"Making internal anonymized tunnel to %s:%d ...",
|
log_info(LD_APP,"Making internal anonymized tunnel to %s:%d ...",
|
||||||
safe_str(address),port); /* XXXX020 Downgrade back to info. */
|
safe_str(address),port);
|
||||||
|
|
||||||
conn = TO_EDGE_CONN(connection_new(CONN_TYPE_AP, AF_INET));
|
conn = TO_EDGE_CONN(connection_new(CONN_TYPE_AP, AF_INET));
|
||||||
conn->_base.linked = 1; /* so that we can add it safely below. */
|
conn->_base.linked = 1; /* so that we can add it safely below. */
|
||||||
|
@ -1952,7 +1952,7 @@ connection_ap_make_bridge(char *address, uint16_t port,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_info(LD_APP,"... AP bridge created and connected.");
|
log_info(LD_APP,"... application connection created and linked.");
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -538,20 +538,20 @@ directory_initiate_command(const char *address, uint32_t addr,
|
||||||
*/
|
*/
|
||||||
conn->dirconn_direct = 0;
|
conn->dirconn_direct = 0;
|
||||||
linked_conn =
|
linked_conn =
|
||||||
connection_ap_make_bridge(conn->_base.address, conn->_base.port,
|
connection_ap_make_link(conn->_base.address, conn->_base.port,
|
||||||
digest,
|
digest,
|
||||||
anonymized_connection ?
|
anonymized_connection ?
|
||||||
SOCKS_COMMAND_CONNECT :
|
SOCKS_COMMAND_CONNECT :
|
||||||
SOCKS_COMMAND_CONNECT_DIR);
|
SOCKS_COMMAND_CONNECT_DIR);
|
||||||
if (!linked_conn) {
|
if (!linked_conn) {
|
||||||
log_warn(LD_NET,"Making AP bridge to dirserver failed.");
|
log_warn(LD_NET,"Making tunnel to dirserver failed.");
|
||||||
connection_mark_for_close(TO_CONN(conn));
|
connection_mark_for_close(TO_CONN(conn));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connection_link_connections(TO_CONN(conn), TO_CONN(linked_conn));
|
connection_link_connections(TO_CONN(conn), TO_CONN(linked_conn));
|
||||||
|
|
||||||
if (connection_add(TO_CONN(conn)) < 0) {
|
if (connection_add(TO_CONN(conn)) < 0) {
|
||||||
log_warn(LD_NET,"Unable to add AP bridge to dirserver.");
|
log_warn(LD_NET,"Unable to add connection for link to dirserver.");
|
||||||
connection_mark_for_close(TO_CONN(conn));
|
connection_mark_for_close(TO_CONN(conn));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2103,7 +2103,7 @@ static INLINE void or_state_mark_dirty(or_state_t *state, time_t when)
|
||||||
struct socks_request_t {
|
struct socks_request_t {
|
||||||
/** Which version of SOCKS did the client use? One of "0, 4, 5" -- where
|
/** Which version of SOCKS did the client use? One of "0, 4, 5" -- where
|
||||||
* 0 means that no socks handshake ever took place, and this is just a
|
* 0 means that no socks handshake ever took place, and this is just a
|
||||||
* stub connection (e.g. see connection_ap_make_bridge()). */
|
* stub connection (e.g. see connection_ap_make_link()). */
|
||||||
char socks_version;
|
char socks_version;
|
||||||
int command; /**< What is this stream's goal? One from the above list. */
|
int command; /**< What is this stream's goal? One from the above list. */
|
||||||
size_t replylen; /**< Length of <b>reply</b>. */
|
size_t replylen; /**< Length of <b>reply</b>. */
|
||||||
|
@ -2439,8 +2439,8 @@ int connection_edge_finished_connecting(edge_connection_t *conn);
|
||||||
int connection_ap_handshake_send_begin(edge_connection_t *ap_conn);
|
int connection_ap_handshake_send_begin(edge_connection_t *ap_conn);
|
||||||
int connection_ap_handshake_send_resolve(edge_connection_t *ap_conn);
|
int connection_ap_handshake_send_resolve(edge_connection_t *ap_conn);
|
||||||
|
|
||||||
edge_connection_t *connection_ap_make_bridge(char *address, uint16_t port,
|
edge_connection_t *connection_ap_make_link(char *address, uint16_t port,
|
||||||
const char *digest, int command);
|
const char *digest, int command);
|
||||||
void connection_ap_handshake_socks_reply(edge_connection_t *conn, char *reply,
|
void connection_ap_handshake_socks_reply(edge_connection_t *conn, char *reply,
|
||||||
size_t replylen,
|
size_t replylen,
|
||||||
int endreason);
|
int endreason);
|
||||||
|
@ -2679,8 +2679,6 @@ int router_supports_extrainfo(const char *identity_digest, int is_authority);
|
||||||
#define UNNAMED_ROUTER_NICKNAME "Unnamed"
|
#define UNNAMED_ROUTER_NICKNAME "Unnamed"
|
||||||
|
|
||||||
int connection_dirserv_flushed_some(dir_connection_t *conn);
|
int connection_dirserv_flushed_some(dir_connection_t *conn);
|
||||||
void connection_dirserv_unlink_from_bridge(dir_connection_t *dir_conn);
|
|
||||||
void connection_dirserv_stop_blocking_all_on_or_conn(or_connection_t *or_conn);
|
|
||||||
|
|
||||||
int dirserv_add_own_fingerprint(const char *nickname, crypto_pk_env_t *pk);
|
int dirserv_add_own_fingerprint(const char *nickname, crypto_pk_env_t *pk);
|
||||||
int dirserv_load_fingerprint_file(void);
|
int dirserv_load_fingerprint_file(void);
|
||||||
|
|
Loading…
Add table
Reference in a new issue