summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2013-10-31Merge remote-tracking branch 'public/bug9780_024_v2' into maint-0.2.4Nick Mathewson
2013-10-31Merge remote-tracking branch 'public/bug6055_v2_024' into maint-0.2.4Nick Mathewson
2013-10-10Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
2013-10-10Fix unit test for format_helper_exit_statusNick Mathewson
Fix format_helper_exit_status to allow full HEX_ERRNO_SIZE answers, *and* increase the buffer length again.
2013-10-10Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
2013-10-08When examining interfaces to find an address, discard non-up ones.Nick Mathewson
Patch from "hantwister" on trac. Fixes bug #9904; bugfix on 0.2.3.11-alpha.
2013-10-08Switch ECDHE group default logic for bridge/relay TLSNick Mathewson
According to the manpage, bridges use P256 for conformity and relays use P224 for speed. But skruffy points out that we've gotten it backwards in the code. In this patch, we make the default P256 for everybody. Fixes bug 9780; bugfix on 0.2.4.8-alpha.
2013-10-08Raise buffer size, fix checks for format_exit_helper_status.Nick Mathewson
This is probably not an exploitable bug, since you would need to have errno be a large negative value in the unix pluggable-transport launcher case. Still, best avoided. Fixes bug 9928; bugfix on 0.2.3.18-rc.
2013-09-25Re-enable TLS 1.[12] when building with OpenSSL >= 1.0.1eNick Mathewson
To fix #6033, we disabled TLS 1.1 and 1.2. Eventually, OpenSSL fixed the bug behind #6033. I've considered alternate implementations that do more testing to see if there's secretly an OpenSSL 1.0.1c or something that secretly has a backport of the OpenSSL 1.0.1e fix, and decided against it on the grounds of complexity.
2013-09-03Avoid a double-close on one failing case of the socketpair replacement codeNick Mathewson
Fix for bug 9400, spotted by coverity. Bug introduced in revision 2cb4f7a4 (subversion revision r389).
2013-08-06Use SOCKET_OK/TOR_INVALID_SOCKET in socketpair replacement codeNick Mathewson
2013-06-18Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/config.c src/or/relay.c
2013-06-18Implement a real OOM-killer for too-long circuit queues.Nick Mathewson
This implements "algorithm 1" from my discussion of bug #9072: on OOM, find the circuits with the longest queues, and kill them. It's also a fix for #9063 -- without the side-effects of bug #9072. The memory bounds aren't perfect here, and you need to be sure to allow some slack for the rest of Tor's usage. This isn't a perfect fix; the rest of the solutions I describe on codeable.
2013-06-13Define SEEK_SET for platforms that lack it.Nick Mathewson
2013-06-13If we write the annotation but not the microdescriptor, rewind.Nick Mathewson
This fixes bug 9047 (and some parts of 9031, 8922, 8883 that weren't fixed in 8822). Bugfix on 0.2.2.6-alpha.
2013-06-12Revert "Use the FILE_SHARE_DELETE flag for CreateFile on a mapping"Nick Mathewson
This reverts commit 884a0e269c382f9e927d8c8b1ef4ef9d2d48379d. I'm reverting this because it doesn't actually make the problem go away. It appears that instead we need to do unmap-then-replace.
2013-06-12Merge remote-tracking branch 'public/bug2077_share_delete' into maint-0.2.4Nick Mathewson
2013-06-12Use the FILE_SHARE_DELETE flag for CreateFile on a mappingNick Mathewson
A comment by rransom on #8795 taken together with a comment by doorss recorded on #2077 suggest that *every* attempt to replace the md cache will fail on Vista/Win7 if we don't have the FILE_SHARE_DELETE flag passed to CreateFile, and if we try to replace the file ourselves before unmapping it. I'm adding the FILE_SHARE_DELETE, since that's this simplest fix. Broken indexers (the favored #2077 hypothesis) could still cause trouble here, but at least this patch should make us stop stepping on our own feet. Likely fix for #2077 and its numerous duplicates. Bugfix on 0.2.2.6-alpha, which first had a microdescriptor cache that would get replaced before remapping it.
2013-04-18Remove a double-newlineNick Mathewson
2013-04-18Merge branch 'less_charbuf_rebased' into maint-0.2.4Nick Mathewson
Conflicts: src/or/dirserv.c src/or/dirserv.h src/test/test_dir.c
2013-04-18Fix a couple of documentation issues.Nick Mathewson
2013-04-18Refactor dirobj signature generationNick Mathewson
Now we can compute the hash and signature of a dirobj before concatenating the smartlist, and we don't need to play silly games with sigbuf and realloc any more.
2013-04-17Merge branch 'bug8037_squashed' into maint-0.2.4Nick Mathewson
2013-04-02Merge remote-tracking branch 'public/bug7707_diagnostic' into maint-0.2.4Nick Mathewson
2013-03-23Avoid clang warnings from implicit off_t->size_t castNick Mathewson
2013-03-19Merge branch 'bug8240_v2_squashed' into maint-0.2.4Nick Mathewson
Conflicts: doc/tor.1.txt src/or/circuitbuild.c src/or/config.c src/or/or.h
2013-03-19Make the guard lifetime configurable and adjustable via the consensusNick Mathewson
Fixes 8240. (Don't actually increase the default guard lifetime. It seems likely to break too many things if done precipitiously.)
2013-03-19Merge remote-tracking branch 'public/bug7950' into maint-0.2.4Nick Mathewson
2013-03-19Merge remote-tracking branch 'public/bug8002' into maint-0.2.4Nick Mathewson
2013-03-18Fix another case of bug 8206; patch from flupzorNick Mathewson
2013-03-18Merge remote-tracking branch 'public/bug6673' into maint-0.2.4Nick Mathewson
2013-03-18Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/test/test_addr.c
2013-03-18Check return values from fcntl and setsockoptNick Mathewson
(Based on a patch from flupzor; bug #8206)
2013-03-15Merge remote-tracking branch 'public/unused_stuff' into maint-0.2.4Nick Mathewson
2013-03-11Track TLS overhead: diagnostic for bug 7707Nick Mathewson
2013-03-11Give an #error when we want threads and OpenSSL has disabled threadsNick Mathewson
Fixes ticket 6673.
2013-03-10start part-way through the ssl cert lifetimeRoger Dingledine
also, snap the start time and end time to a day boundary, since most certs in the wild seem to do this.
2013-03-01Make sure that [::1] is recognized as a private addressNick Mathewson
Fixes bug 8377; bugfix on 0.2.1.3-alpha.
2013-02-23Remove some functions which were unused except for their testsNick Mathewson
2013-02-23Remove some totally unused functionsNick Mathewson
2013-02-23Remove a bunch of unused macro definitionsNick Mathewson
2013-02-19Make a parse_config_line_from_str variant that gives error messagesNick Mathewson
Without this patch, there's no way to know what went wrong when we fail to parse a torrc line entirely (that is, we can't turn it into a K,V pair.) This patch introduces a new function that yields an error message on failure, so we can at least tell the user what to look for in their nonfunctional torrc. (Actually, it's the same function as before with a new name: parse_config_line_from_str is now a wrapper macro that the unit tests use.) Fixes bug 7950; fix on 0.2.0.16-alpha (58de695f9062576f) which first introduced the possibility of a torrc value not parsing correctly.
2013-02-19Check for CPUs more accurartely when ONLN != CONF.Nick Mathewson
There are two ways to use sysconf to ask about the number of CPUs. When we're on a VM, we would sometimes get it wrong by asking for the number of total CPUs (say, 64) when we should have been asking for the number of CPUs online (say, 1 or 2). Fix for bug 8002.
2013-02-11Make _SC_OPEN_MAX actually get used when closing fds before exec.Nick Mathewson
Fixes bug 8209; bugfix on 0.2.3.1-alpha.
2013-02-11Merge remote-tracking branch 'public/bug7801_v2'Nick Mathewson
2013-02-08Improve comment at Andrea's requestNick Mathewson
2013-02-08Merge remote-tracking branch 'public/signof_enum'Nick Mathewson
2013-02-08Fix numerous problems with Tor's weak RNG.Nick Mathewson
We need a weak RNG in a couple of places where the strong RNG is both needless and too slow. We had been using the weak RNG from our platform's libc implementation, but that was problematic (because many platforms have exceptionally horrible weak RNGs -- like, ones that only return values between 0 and SHORT_MAX) and because we were using it in a way that was wrong for LCG-based weak RNGs. (We were counting on the low bits of the LCG output to be as random as the high ones, which isn't true.) This patch adds a separate type for a weak RNG, adds an LCG implementation for it, and uses that exclusively where we had been using the platform weak RNG.
2013-02-07Merge remote-tracking branch 'public/easy_ratelim'Nick Mathewson
Conflicts: src/or/connection.c
2013-02-07Have autoconf check whether enums are signed.Nick Mathewson
Fixes bug 7727; fix on 0.2.4.10-alpha.