diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-07 17:13:51 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-07 17:13:51 -0500 |
commit | 3433216268a97f8c1595fd389da0e960e8074d32 (patch) | |
tree | 059f7b25c662162f1015fb5cafd82d2010754d65 /src/or/buffers.c | |
parent | e5b07ba17947ba4782cbac8f12de7024b2969c99 (diff) | |
parent | a7334f5122046b55a5eff425cdaaa3e56c5defed (diff) | |
download | tor-3433216268a97f8c1595fd389da0e960e8074d32.tar.gz tor-3433216268a97f8c1595fd389da0e960e8074d32.zip |
Merge remote-tracking branch 'public/easy_ratelim'
Conflicts:
src/or/connection.c
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index e5fac9172d..73c25579d6 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1505,22 +1505,19 @@ log_unsafe_socks_warning(int socks_protocol, const char *address, static ratelim_t socks_ratelim = RATELIM_INIT(SOCKS_WARN_INTERVAL); const or_options_t *options = get_options(); - char *m = NULL; if (! options->WarnUnsafeSocks) return; - if (safe_socks || (m = rate_limit_log(&socks_ratelim, approx_time()))) { - log_warn(LD_APP, + if (safe_socks) { + log_fn_ratelim(&socks_ratelim, LOG_WARN, LD_APP, "Your application (using socks%d to port %d) is giving " "Tor only an IP address. Applications that do DNS resolves " "themselves may leak information. Consider using Socks4A " "(e.g. via privoxy or socat) instead. For more information, " "please see https://wiki.torproject.org/TheOnionRouter/" - "TorFAQ#SOCKSAndDNS.%s%s", + "TorFAQ#SOCKSAndDNS.%s", socks_protocol, (int)port, - safe_socks ? " Rejecting." : "", - m ? m : ""); - tor_free(m); + safe_socks ? " Rejecting." : ""); } control_event_client_status(LOG_WARN, "DANGEROUS_SOCKS PROTOCOL=SOCKS%d ADDRESS=%s:%d", |