summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2018-07-25 14:28:06 +1000
committerteor <teor@torproject.org>2018-07-25 14:30:33 +1000
commit6443812e343635d0db6ea1aac58b817732b7f29a (patch)
tree88cffed5d646acb88711e902daba4717efcc6d83 /src/or/connection_or.c
parent93da2cae49d0f3fbcf1c05932b76b2e6bd15017a (diff)
downloadtor-6443812e343635d0db6ea1aac58b817732b7f29a.tar.gz
tor-6443812e343635d0db6ea1aac58b817732b7f29a.zip
Stop logging link auth warnings on Single Onion Services and Tor2web
Instead, log a protocol warning when single onion services or Tor2web clients fail to authenticate direct connections to relays. Fixes bug 26924; bugfix on 0.2.9.1-alpha.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 8beedcae72..a01d086279 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -47,6 +47,7 @@
#include "nodelist.h"
#include "reasons.h"
#include "relay.h"
+#include "rendcommon.h"
#include "rephist.h"
#include "router.h"
#include "routerlist.h"
@@ -1628,10 +1629,13 @@ connection_or_client_learned_peer_id(or_connection_t *conn,
conn->identity_digest);
const int is_authority_fingerprint = router_digest_is_trusted_dir(
conn->identity_digest);
+ const int non_anonymous_mode = rend_non_anonymous_mode_enabled(options);
int severity;
const char *extra_log = "";
- if (server_mode(options)) {
+ /* Relays, Single Onion Services, and Tor2web make direct connections using
+ * untrusted authentication keys. */
+ if (server_mode(options) || non_anonymous_mode) {
severity = LOG_PROTOCOL_WARN;
} else {
if (using_hardcoded_fingerprints) {