[tor-bugs] #6683 [Tor Relay]: Request: add offset to current system time
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Sun Aug 26 18:03:40 UTC 2012
#6683: Request: add offset to current system time
-------------------------+--------------------------------------------------
Reporter: tmpname0901 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Tor: unspecified
Component: Tor Relay | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by tmpname0901):
Hmmm... that "faketime" looks intriguing. Thanks for the heads-up. I'll
take a look at it.
In the meantime, attached is the patch to implement my requested
enhancement. This patch is against Tor v0.2.3.20.rc and has been running
( fingerprint: 24EB8A109D4C2555B2D61BB6C70041B5C4702066 ) for about 36
hours now. I'm running with new config option TimeOffset option set to
-7356 to compensate for my 2:02:36 system time inaccuracy.
The heavy lifting is done in file or.h with this line:
#define CURRTIME (time(NULL) + get_options()->TimeOffset)
Then the many, many occurrences of 'time(NULL)' are replaced by
'CURRTIME'.
I started out replacing all occurrences of 'time(NULL)' then backed out a
few of the replacements, the ones encountered early, before the config
options are parsed.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6683#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list