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.
This commit is contained in:
teor 2018-07-25 14:28:06 +10:00
parent 93da2cae49
commit 6443812e34
2 changed files with 9 additions and 1 deletions

4
changes/bug26924 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (single onion services, Tor2web):
- 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.

View File

@ -47,6 +47,7 @@
#include "nodelist.h" #include "nodelist.h"
#include "reasons.h" #include "reasons.h"
#include "relay.h" #include "relay.h"
#include "rendcommon.h"
#include "rephist.h" #include "rephist.h"
#include "router.h" #include "router.h"
#include "routerlist.h" #include "routerlist.h"
@ -1628,10 +1629,13 @@ connection_or_client_learned_peer_id(or_connection_t *conn,
conn->identity_digest); conn->identity_digest);
const int is_authority_fingerprint = router_digest_is_trusted_dir( const int is_authority_fingerprint = router_digest_is_trusted_dir(
conn->identity_digest); conn->identity_digest);
const int non_anonymous_mode = rend_non_anonymous_mode_enabled(options);
int severity; int severity;
const char *extra_log = ""; 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; severity = LOG_PROTOCOL_WARN;
} else { } else {
if (using_hardcoded_fingerprints) { if (using_hardcoded_fingerprints) {