diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-29 14:53:53 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-29 14:53:53 +0000 |
commit | ae3ce7b3873e61eb4d6c273820a0cabf3e471081 (patch) | |
tree | f6ed2af567780f8eee4c3c1a23a20f4256f09a1b /src/or/buffers.c | |
parent | 57db1c1a7dd4a1fd85fa462951737880189e5965 (diff) | |
download | tor-ae3ce7b3873e61eb4d6c273820a0cabf3e471081.tar.gz tor-ae3ce7b3873e61eb4d6c273820a0cabf3e471081.zip |
Patch from mwenge: update TrackHostExits mapping expiry times when the mappings are used, so that they expire a while after their last use, not a while after their creation.
svn:r17004
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 634df13b10..ba70e555dc 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1402,7 +1402,7 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, req->port = ntohs(get_uint16(buf->head->data+4+addrlen)); buf_remove_from_front(buf, 6+addrlen); if (req->command != SOCKS_COMMAND_RESOLVE_PTR && - !addressmap_have_mapping(req->address) && + !addressmap_have_mapping(req->address,0) && !have_warned_about_unsafe_socks) { log_warn(LD_APP, "Your application (using socks5 to port %d) is giving " @@ -1412,7 +1412,8 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, "please see http://wiki.noreply.org/noreply/TheOnionRouter/" "TorFAQ#SOCKSAndDNS.%s", req->port, safe_socks ? " Rejecting." : ""); -// have_warned_about_unsafe_socks = 1; // (for now, warn every time) + /*have_warned_about_unsafe_socks = 1;*/ + /*(for now, warn every time)*/ control_event_client_status(LOG_WARN, "DANGEROUS_SOCKS PROTOCOL=SOCKS5 ADDRESS=%s:%d", req->address, req->port); @@ -1514,7 +1515,7 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, startaddr = NULL; if (socks4_prot != socks4a && - !addressmap_have_mapping(tmpbuf) && + !addressmap_have_mapping(tmpbuf,0) && !have_warned_about_unsafe_socks) { log_warn(LD_APP, "Your application (using socks4 to port %d) is giving Tor " @@ -1524,7 +1525,7 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, "please see http://wiki.noreply.org/noreply/TheOnionRouter/" "TorFAQ#SOCKSAndDNS.%s", req->port, safe_socks ? " Rejecting." : ""); -// have_warned_about_unsafe_socks = 1; // (for now, warn every time) + /*have_warned_about_unsafe_socks = 1;*/ /*(for now, warn every time)*/ control_event_client_status(LOG_WARN, "DANGEROUS_SOCKS PROTOCOL=SOCKS4 ADDRESS=%s:%d", tmpbuf, req->port); |