diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-05-06 17:17:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-05-06 17:17:19 -0400 |
commit | 3a785dd5beeaadcd4205f24d6949fdbbdfb5651e (patch) | |
tree | e3d9faad6f0bdcf2fe70221f21a08a7e154f4587 /src | |
parent | e39b35f1de689fd1ad1ad3a6a902bf6371e6f5ce (diff) | |
parent | b444096be5ac509be1b2b68dc8e18ca1f558fef5 (diff) | |
download | tor-3a785dd5beeaadcd4205f24d6949fdbbdfb5651e.tar.gz tor-3a785dd5beeaadcd4205f24d6949fdbbdfb5651e.zip |
Merge branch 'maint-0.4.3'
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/connection_edge.c | 6 | ||||
-rw-r--r-- | src/core/or/connection_or.c | 1 | ||||
-rw-r--r-- | src/feature/control/btrack_orconn_cevent.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index 1bf08437da..5c9bf64e8e 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -1658,9 +1658,11 @@ parse_extended_hostname(char *address, hostname_type_t *type_out) failed: /* otherwise, return to previous state and return 0 */ *s = '.'; + const bool is_onion = (*type_out == ONION_V2_HOSTNAME) || + (*type_out == ONION_V3_HOSTNAME); log_warn(LD_APP, "Invalid %shostname %s; rejecting", - (*type_out == (ONION_V2_HOSTNAME || ONION_V3_HOSTNAME) ? "onion " : ""), - safe_str_client(address)); + is_onion ? "onion " : "", + safe_str_client(address)); return false; } diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index 53a093e138..5d71b363f8 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -661,6 +661,7 @@ connection_or_finished_flushing(or_connection_t *conn) } break; } + break; case OR_CONN_STATE_OPEN: case OR_CONN_STATE_OR_HANDSHAKING_V2: case OR_CONN_STATE_OR_HANDSHAKING_V3: diff --git a/src/feature/control/btrack_orconn_cevent.c b/src/feature/control/btrack_orconn_cevent.c index c5de473d0f..d11be59280 100644 --- a/src/feature/control/btrack_orconn_cevent.c +++ b/src/feature/control/btrack_orconn_cevent.c @@ -147,6 +147,7 @@ bto_cevent_apconn(const bt_orconn_t *bto) break; case OR_CONN_STATE_OPEN: control_event_bootstrap(BOOTSTRAP_STATUS_AP_HANDSHAKE_DONE, 0); + break; default: break; } |