diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2023-07-17 19:19:04 +0200 |
---|---|---|
committer | trinity-1686a <trinity@deuxfleurs.fr> | 2023-07-17 19:40:26 +0200 |
commit | 1901720fb92291daf71efbe848a94f27a629f180 (patch) | |
tree | a7a2fa84b21975fc007109f1833911e5df6be67d /src/feature | |
parent | 1b4b354f4d76bce21cf68e3cc19e16d5dab26061 (diff) | |
download | tor-1901720fb92291daf71efbe848a94f27a629f180.tar.gz tor-1901720fb92291daf71efbe848a94f27a629f180.zip |
Warn when operating as bridge and exit
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/relay/relay_config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/feature/relay/relay_config.c b/src/feature/relay/relay_config.c index 553b269ecf..0b02461318 100644 --- a/src/feature/relay/relay_config.c +++ b/src/feature/relay/relay_config.c @@ -30,6 +30,7 @@ #include "core/mainloop/cpuworker.h" #include "core/mainloop/mainloop.h" #include "core/or/connection_or.h" +#include "core/or/policies.h" #include "core/or/port_cfg_st.h" #include "feature/hibernate/hibernate.h" @@ -1150,6 +1151,13 @@ options_validate_relay_mode(const or_options_t *old_options, REJECT("BridgeRelay is 1, ORPort is not set. This is an invalid " "combination."); + if (options->BridgeRelay == 1 && (options->ExitRelay == 1 || + !policy_using_default_exit_options(options))) { + log_warn(LD_CONFIG, "BridgeRelay is 1, but ExitRelay is 1 or an " + "ExitPolicy is configured. Tor will start, but it will not " + "function as an exit relay."); + } + if (server_mode(options)) { char *dircache_msg = NULL; if (have_enough_mem_for_dircache(options, 0, &dircache_msg)) { |