Age | Commit message (Collapse) | Author |
|
This is necessary to avoid crashes and test failures on kevent-based
systems.
Fixes bug 22209; bug not in any released Tor.
|
|
|
|
|
|
OpenBSD removes this function, and now that Tor requires Libevent 2,
we should also support the OpenBSD Libevent 2.
Fixes bug 19904; bugfix on 0.2.5.4-alpha.
|
|
|
|
|
|
|
|
Only some very ancient distributions don't ship with Libevent 2 anymore,
even the oldest supported Ubuntu LTS version has it. This allows us to
get rid of a lot of compat code.
|
|
|
|
|
|
This is a big-ish patch, but it's very straightforward. Under this
clang warning, we're not actually allowed to have a global variable
without a previous extern declaration for it. The cases where we
violated this rule fall into three roughly equal groups:
* Stuff that should have been static.
* Stuff that was global but where the extern was local to some
other C file.
* Stuff that was only global when built for the unit tests, that
needed a conditional extern in the headers.
The first two were IMO genuine problems; the last is a wart of how
we build tests.
|
|
|
|
Closes ticket 18241.
|
|
|
|
|
|
This actually lets us dump a lot of old cruft that nobody had (I
hope!) tested in ages.
Closes 15248.
|
|
|
|
|
|
Conflicts:
src/or/or.h
src/test/Makefile.nmake
|
|
Part of fix for 13172
|
|
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code. Right?
|
|
|
|
Fixes CID 752028
|
|
|
|
Previously, we had done this only in the connection_free() case, but
when we called connection_free_() directly from
connections_free_all(), we didn't free the connections.
|
|
Libevent uses an arc4random implementation (I know, I know) to
generate DNS transaction IDs and capitalization. But it liked to
initialize it either with opening /dev/urandom (which won't work
under the sandbox if it doesn't use the right pointer), or with
sysctl({CTL_KERN,KERN_RANDOM,RANDOM_UUIC}). To make _that_ work, we
were permitting sysctl unconditionally. That's not such a great
idea.
Instead, we try to initialize the libevent PRNG _before_ installing
the sandbox, and make sysctl always fail with EPERM under the
sandbox.
|
|
|
|
Conflicts:
src/common/compat_libevent.h
src/or/relay.c
|
|
Conflicts:
src/or/relay.c
|
|
In a couple of places, to implement the OOM-circuit-killer defense
against sniper attacks, we have counters to remember the age of
cells or data chunks. These timers were based on wall clock time,
which can move backwards, thus giving roll-over results for our age
calculation. This commit creates a low-budget monotonic time, based
on ratcheting gettimeofday(), so that even in the event of a time
rollback, we don't do anything _really_ stupid.
A future version of Tor should update this function to do something
even less stupid here, like employ clock_gettime() or its kin.
|
|
|
|
of libevent, openssl and zlib. Partially implements #6384.
|
|
This is meant to avoid conflict with the built-in log() function in
math.h. It resolves ticket 7599. First reported by dhill.
This was generated with the following perl script:
#!/usr/bin/perl -w -i -p
s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g;
s/\blog\(/tor_log\(/g;
|
|
It looks like there was a compilation error for 6826 on some
platforms. Removing even more now-uncallable code to handle detecting
libevent versions before 1.3e.
Fixes bug 8012; bug not in any released Tor.
|
|
(Pull on a thread and the whole sweater unravels.)
|
|
This won't actually break them any worse than they were broken before:
it just removes a set of warnings that nobody was actually seeing, I
hope.
Closes 6826
|
|
|
|
OTOH, log the Libevent and OpenSSL versions on the first line when
we're starting Tor.
|
|
|
|
|
|
|
|
Also, try to resolve some doxygen issues. First, define a magic
"This is doxygen!" macro so that we take the correct branch in
various #if/#else/#endifs in order to get the right documentation.
Second, add in a few grouping @{ and @} entries in order to get some
variables and fields to get grouped together.
|
|
This commit is completely mechanical; I used this perl script to make it:
#!/usr/bin/perl -w -i.bak -p
if (/^\s*\#/) {
s/MS_WINDOWS/_WIN32/g;
s/\bWIN32\b/_WIN32/g;
}
|
|
This re-applies f77f9bddb8bf0dd6e9c3e0d94269aa23f459a272 which got
accidentally reverted in 53f535aeb863204470379b2da4631770fa10b13f.
Thanks asn for spotting this.
|
|
This reverts commit 406ae1ba5ad529a4d0e710229dab6ed645d42b50.
|
|
This reverts commit f77f9bddb8bf0dd6e9c3e0d94269aa23f459a272.
|
|
This reverts commit 7920ea55b8d994268d2b07f27316b0f34d8f27e5.
|
|
This reverts commit 9a88c0cd32df53116a6bbb6b961650943755061c.
|
|
This reverts commit aba25a6939a5907d40dbcff7433a8c130ffd12ad.
|
|
This avoids a dangling pointer issue in the 3412 code, and should
fix bug 4599.
|