Nick Mathewson [Sat, 26 Mar 2011 05:34:42 +0000 (01:34 -0400)]
Use timevals, not time_t, when expiring circuits.
We've got millisecond timers now, we might as well use them.
This change won't actually make circuits get expiered with microsecond
precision, since we only call the expiry functions once per second.
Still, it should avoid the situation where we have a circuit get
expired too early because of rounding.
A couple of the expiry functions now call tor_gettimeofday: this
should be cheap since we're only doing it once per second. If it gets
to be called more often, though, we should onsider having the current
time be an argument again.
Sebastian Hahn [Fri, 18 Mar 2011 16:04:01 +0000 (17:04 +0100)]
Remove superfluous -g -O2 compiler argument
Autoconf adds -g -O2 by default, so adding it ourselves is not required.
It also caused a warning with clang for every source file, so remove it
here. Fixes last issue of ticket 2696.
Nick Mathewson [Mon, 14 Mar 2011 21:48:45 +0000 (17:48 -0400)]
Consider sending stream-level SENDME cells on partial flushes.
Right now, we only consider sending stream-level SENDME cells when we
have completely flushed a connection_edge's outbuf, or when it sends
us a DATA cell. Neither of these is ideal for throughput.
This patch changes the behavior so we now call
connection_edge_consider_sending_sendme when we flush _some_ data from
an edge outbuf.
Sebastian Hahn [Wed, 9 Mar 2011 10:34:04 +0000 (11:34 +0100)]
Use observed instead of declared uptime for HSDir
It is important to verify the uptime claim of a relay instead of just
trusting it, otherwise it becomes too easy to blackhole a specific
hidden service. rephist already has data available that we can use here.
Nick Mathewson [Tue, 25 Jan 2011 19:01:04 +0000 (14:01 -0500)]
Backport: Generate version tags using Git, not (broken) svn revisions.
Partial backport of daa0326aaaa85a760be94ee2360cfa61a9fb5be2 .
Resolves bug 2402. Bugfix on 0.2.1.15 (for the part where we switched to
git) and on 0.2.1.30 (for the part where we dumped micro-revisions.)
Steven Murdoch [Wed, 9 Mar 2011 19:05:51 +0000 (19:05 +0000)]
Fix compilation under LLVM/clang with --enable-gcc-warnings
- When compiling using clang (2.9 or lower) do not enable
-Wnormalized=id or -Woverride-init when --enable-gcc-warnings
or --enable-gcc-warnings-advisory is set as these options
are unsupported.
Sebastian Hahn [Sun, 6 Mar 2011 23:03:09 +0000 (00:03 +0100)]
Fix log message when we have too few dirauths
The calculation of when to send the logmessage was correct, but we
didn't give the correct number of relays required: We want more than
half of all authorities we know about. Fixes bug 2663.
Sebastian Hahn [Sun, 6 Mar 2011 17:20:28 +0000 (18:20 +0100)]
Disallow reject6 and accept6 lines in descriptors
This fixes a remotely triggerable assert on directory authorities, who
don't handle descriptors with ipv6 contents well yet. We will want to
revert this once we're ready to handle ipv6.
Issue raised by lorth on #tor, who wasn't able to use Tor anymore.
Analyzed with help from Christian Fromme. Fix suggested by arma. Bugfix
on 0.2.1.3-alpha.
Nick Mathewson [Tue, 1 Mar 2011 22:08:02 +0000 (17:08 -0500)]
Avoid spurious bwhist parsing failures
This should fix a bug that special ran into, where if your state file
didn't record period maxima, it would never decide that it had
successfully parsed itself unless you got lucky with your
uninitialized-variable values.
This patch also tries to improve error messags in the case where a
maximum value legitimately doesn't parse.
Sebastian Hahn [Sat, 26 Feb 2011 08:06:09 +0000 (09:06 +0100)]
Fix GETINFO config-text for private networks
In private networks, the defaults for some options are changed. This
means that in options_validate(), where we're testing that the defaults
are what we think they are, we fail. Use a workaround by setting a
hidden configuration option _UsingTestingTorNetwork when we have altered
the configuration this way, so that options_validate() can do the right
thing.
Fixes bug 2250, bugfix on 0.2.1.2-alpha (the version introducing private
network options).