diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-03 16:11:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-16 09:22:58 -0500 |
commit | 13dac5e463e183695e6579fb8bdd4747db50cf6e (patch) | |
tree | 198e9c45ae6753d691110dcdb00da75503f72dd1 /src/or/relay.c | |
parent | 58d17add5e701f8d9b2d3fbe84f0dfd5c9e23c30 (diff) | |
download | tor-13dac5e463e183695e6579fb8bdd4747db50cf6e.tar.gz tor-13dac5e463e183695e6579fb8bdd4747db50cf6e.zip |
Move entry_port_cfg_t fields in entry_connection_t
Also rename some options for uniformity, and apply this script:
@@
entry_connection_t *conn;
@@
conn->
+entry_cfg.
\(
isolation_flags
\|
session_group
\|
socks_prefer_no_auth
\|
ipv4_traffic
\|
ipv6_traffic
\|
prefer_ipv6
\|
cache_ipv4_answers
\|
cache_ipv6_answers
\|
use_cached_ipv4_answers
\|
use_cached_ipv6_answers
\|
prefer_ipv6_virtaddr
\)
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 4915fbcd98..201f5c3d34 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -804,8 +804,8 @@ connection_ap_process_end_not_open( return 0; } - if ((tor_addr_family(&addr) == AF_INET && !conn->ipv4_traffic_ok) || - (tor_addr_family(&addr) == AF_INET6 && !conn->ipv6_traffic_ok)) { + if ((tor_addr_family(&addr) == AF_INET && !conn->entry_cfg.ipv4_traffic) || + (tor_addr_family(&addr) == AF_INET6 && !conn->entry_cfg.ipv6_traffic)) { log_fn(LOG_PROTOCOL_WARN, LD_APP, "Got an EXITPOLICY failure on a connection with a " "mismatched family. Closing."); @@ -1156,11 +1156,11 @@ connection_ap_handshake_socks_got_resolved_cell(entry_connection_t *conn, addr_hostname = addr; } } else if (tor_addr_family(&addr->addr) == AF_INET) { - if (!addr_ipv4 && conn->ipv4_traffic_ok) { + if (!addr_ipv4 && conn->entry_cfg.ipv4_traffic) { addr_ipv4 = addr; } } else if (tor_addr_family(&addr->addr) == AF_INET6) { - if (!addr_ipv6 && conn->ipv6_traffic_ok) { + if (!addr_ipv6 && conn->entry_cfg.ipv6_traffic) { addr_ipv6 = addr; } } @@ -1181,7 +1181,7 @@ connection_ap_handshake_socks_got_resolved_cell(entry_connection_t *conn, return; } - if (conn->prefer_ipv6_traffic) { + if (conn->entry_cfg.prefer_ipv6) { addr_best = addr_ipv6 ? addr_ipv6 : addr_ipv4; } else { addr_best = addr_ipv4 ? addr_ipv4 : addr_ipv6; @@ -1327,8 +1327,8 @@ connection_edge_process_relay_cell_not_open( return 0; } - if ((family == AF_INET && ! entry_conn->ipv4_traffic_ok) || - (family == AF_INET6 && ! entry_conn->ipv6_traffic_ok)) { + if ((family == AF_INET && ! entry_conn->entry_cfg.ipv4_traffic) || + (family == AF_INET6 && ! entry_conn->entry_cfg.ipv6_traffic)) { log_fn(LOG_PROTOCOL_WARN, LD_APP, "Got a connected cell to %s with unsupported address family." " Closing.", fmt_addr(&addr)); |