diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-20 08:50:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-20 08:50:49 -0400 |
commit | c4e8548c59c1eb423fe6a39f2712dbc1eff3951a (patch) | |
tree | e2f3547c87433301503f043e076f47fb4c7f97a6 /src | |
parent | 9e0587f806268c0ab96a73238c0409e95b0fbed6 (diff) | |
download | tor-c4e8548c59c1eb423fe6a39f2712dbc1eff3951a.tar.gz tor-c4e8548c59c1eb423fe6a39f2712dbc1eff3951a.zip |
Warn on ExtORPort USERADDR that is missing or 0.
Diagnoses violations on #23080.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/ext_orport.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c index c22a2f13d8..28377a3f36 100644 --- a/src/or/ext_orport.c +++ b/src/or/ext_orport.c @@ -460,6 +460,11 @@ connection_ext_or_handle_cmd_useraddr(connection_t *conn, tor_free(addr_str); if (res<0) return -1; + if (port == 0) { + log_warn(LD_GENERAL, "Server transport proxy gave us an empty port " + "in ExtORPort UserAddr command."); + // return -1; // enable this if nothing breaks after a while. + } res = tor_addr_parse(&addr, address_part); tor_free(address_part); |