Opened 10 years ago

Last modified 7 years ago

#1013 closed defect (Fixed)

DirPortFrontPage gets rate limited and goes silent

Reported by: arma Owned by:
Priority: Low Milestone: 0.2.1.x-final
Component: Core Tor/Tor Version: 0.2.1.15-rc
Severity: Keywords:
Cc: arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

http://tor.sebastianhahn.net:443/ should say 'test', but instead it fails quietly
because the relay has hit its rate limits recently and doesn't want to waste any
bytes on frivolous directory stuff.

I think this is a bug, since people intentionally set DirPortFrontPage, so they
really do want their relay to serve that page when it's asked for. Having it
appear only sometimes (or roughly never in Sebastian's case) makes it way less
useful.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (3)

comment:1 Changed 10 years ago by arma

And here's the fix:

diff --git a/src/or/directory.c b/src/or/directory.c
index 1b972a3..669ea68 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2407,13 +2407,6 @@ directory_handle_command_get(dir_connection_t *conn, cons

dlen = strlen(frontpage);
/* Let's return a disclaimer page (users shouldn't use V1 anymore,

and caches don't fetch '/', so this is safe). */

  • if (global_write_bucket_low(TO_CONN(conn), dlen, 1)) {
  • log_info(LD_DIRSERV,
  • "Client asked for DirPortFrontPage content, but we've been "
  • "writing too many bytes lately. Sending 503 Dir busy.");
  • write_http_status_line(conn, 503, "Directory busy, try again later");
  • goto done;
  • }

note_request(url, dlen);
write_http_response_header_impl(conn, dlen, "text/html", "identity",

NULL, DIRPORTFRONTPAGE_CACHE_LIFETIME);

comment:2 Changed 10 years ago by nickm

flyspray2trac: bug closed.

comment:3 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.