[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #17739 [Tor]: Refactor clock skew warning code to avoid duplication
#17739: Refactor clock skew warning code to avoid duplication
---------------------------------------------+-----------------------------
Reporter: teor | Owner:
Type: enhancement | Status:
Priority: Medium | needs_revision
Component: Tor | Milestone: Tor:
Severity: Normal | 0.2.8.x-final
Keywords: easy refactor TorCoreTeam201512 | Version: Tor:
Parent ID: #9675 | unspecified
Sponsor: | Resolution:
| Actual Points:
| Points:
---------------------------------------------+-----------------------------
Changes (by teor):
* status: needs_review => needs_revision
Comment:
Replying to [comment:7 arlolra]:
> > Can you update the patch so it calls clock_skew_warning from
or_state_load?
>
> The only shared part is the string, `"Tor requires an accurate clock to
work: please check your time, timezone, and date settings."` If you want,
we can put somewhere and interpolate it in both places. Otherwise, how
would you suggest I update the patch?
However we detect clock skew, we want to take the same actions. At the
moment, that's:
* warn the user
* send the controller a clock skew event
In or_state_load can you do something like:
{{{
clock_skew_warning(NULL, apparent_skew, 1, LD_GENERAL, "local state file",
state_file_path);
}}}
This would make the logic in clock_skew_warning slightly more complex -
please check that conn is not NULL before printing conn->address and
conn->port.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17739#comment:8>
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