aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2019-07-02 19:09:22 +0200
committerDavid Goulet <dgoulet@torproject.org>2020-10-06 09:30:10 -0400
commitad087432995e1a55b9b9e63f28e295cbec528890 (patch)
treeb447a8e07663fa3708b900a7b978344575549091 /src
parentdb0aaf428ebb00b37b451db1d5eecb2fd5689b79 (diff)
downloadtor-ad087432995e1a55b9b9e63f28e295cbec528890.tar.gz
tor-ad087432995e1a55b9b9e63f28e295cbec528890.zip
Rename `OUTBOUND_ADDR_EXIT_AND_OR` to `OUTBOUND_ADDR_ANY`.
This patch renames the enumeration value in `outbound_addr_t` from `OUTBOUND_ADDR_EXIT_AND_OR` to `OUTBOUND_ADDR_ANY` since with the arrival of `OUTBOUND_ADDR_PT` it no longer makes sense to call the fallback value for "Exit and OR". Instead we rename it to "any". See: https://bugs.torproject.org/5304
Diffstat (limited to 'src')
-rw-r--r--src/app/config/config.c2
-rw-r--r--src/app/config/or_options_st.h10
-rw-r--r--src/core/mainloop/connection.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 9fee83aebb..46d98b2ab2 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -7205,7 +7205,7 @@ parse_outbound_addresses(or_options_t *options, int validate_only, char **msg)
}
if (parse_outbound_address_lines(options->OutboundBindAddress,
- OUTBOUND_ADDR_EXIT_AND_OR, options,
+ OUTBOUND_ADDR_ANY, options,
validate_only, msg) < 0) {
goto err;
}
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index ce3006cc37..7f201b8dd7 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -24,7 +24,7 @@ struct config_suite_t;
struct routerset_t;
/** Enumeration of outbound address configuration types:
- * Exit-only, OR-only, or both */
+ * Exit-only, OR-only, PT-only, or any of them */
typedef enum {
/** Outbound IP address for Exit connections. Controlled by the
* `OutboundBindAddressExit` configuration entry in torrc. */
@@ -38,11 +38,11 @@ typedef enum {
* `OutboundBindAddressPT` configuration entry in torrc. */
OUTBOUND_ADDR_PT,
- /** Outbound IP address for both Exit and OR connections. Controlled by the
+ /** Outbound IP address for any outgoing connections. Controlled by the
* OutboundBindAddress configuration entry in torrc. This value is used as
- * fallback if the more specific OUTBOUND_ADDR_EXIT and OUTBOUND_ADDR_OR is
- * unset. */
- OUTBOUND_ADDR_EXIT_AND_OR,
+ * fallback if the more specific OUTBOUND_ADDR_EXIT, OUTBOUND_ADDR_OR, and
+ * OUTBOUND_ADDR_PT are unset. */
+ OUTBOUND_ADDR_ANY,
/** Max value for this enum. Must be the last element in this enum. */
OUTBOUND_ADDR_MAX
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 29ffdaaf4e..c043b1ccec 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -2331,9 +2331,9 @@ conn_get_outbound_address(sa_family_t family,
ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_EXIT]
[fam_index];
} else if (!tor_addr_is_null(
- &options->OutboundBindAddresses[OUTBOUND_ADDR_EXIT_AND_OR]
+ &options->OutboundBindAddresses[OUTBOUND_ADDR_ANY]
[fam_index])) {
- ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_EXIT_AND_OR]
+ ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_ANY]
[fam_index];
}
} else { // All non-exit connections
@@ -2342,9 +2342,9 @@ conn_get_outbound_address(sa_family_t family,
ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_OR]
[fam_index];
} else if (!tor_addr_is_null(
- &options->OutboundBindAddresses[OUTBOUND_ADDR_EXIT_AND_OR]
+ &options->OutboundBindAddresses[OUTBOUND_ADDR_ANY]
[fam_index])) {
- ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_EXIT_AND_OR]
+ ext_addr = &options->OutboundBindAddresses[OUTBOUND_ADDR_ANY]
[fam_index];
}
}