[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #20511 [Core Tor/Tor]: add a failsafe where if you're about to serve a consensus that you know is obsolete, don't do it
#20511: add a failsafe where if you're about to serve a consensus that you know is
obsolete, don't do it
--------------------------+------------------------------------
Reporter: arma | Owner:
Type: enhancement | Status: merge_ready
Priority: Medium | Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor | Version: Tor: 0.2.9.1-alpha
Severity: Normal | Resolution:
Keywords: 029-proposed | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by arma):
Replying to [comment:7 rubiate]:
> +#define TOO_OLD_WARNING_TIMEOUT 60*60
Putting parens around this value will make you a happier camper in the
future. The above line is straight out of some arithmetic precedence
example bug.
Also, for your {{{static time_t warned}}}, did you know about the
rate_limit_log() function? It might be what you wanted here.
> + format_local_iso_time(timestamp, v->valid_until);
> + log_fn(severity, LD_DIRSERV,
> + "Our %s%sconsensus is too old, we will not serve it to
clients. "
> + "It was valid until %s and we continued to serve it for up to
24 "
> + "hours after it expired.",
> + flavor ? flavor : "", flavor ? " " : "", timestamp);
A) s/old, we/old, so we/
B) I think format_local_iso_time() produces a time in the local time zone,
right? So we should clarify in the log message by adding a phrase like
"(in local time zone)". Otherwise we've left it ambiguous whether we mean
the UTC time that consensuses use, or the local time that log lines
sometimes use.
> + tor_free(header);
> + header = NULL;
tor_free sets its argument to NULL already, right?
Good to see unit tests!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20511#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs