aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* simplify timing checksRoger Dingledine2013-02-11
| | | | | now that both timers are on the same schedule, there's no point tracking separate timers.
* Check for IP address change every minute, not 15 minutesRoger Dingledine2013-02-11
| | | | | | | | | | | | Relays used to check every 10 to 60 seconds, as an accidental side effect of calling directory_fetches_from_authorities() when considering doing a directory fetch. The fix for bug 1992 removes that side effect. At the same time, bridge relays never had the side effect, leading to confused bridge operators who tried crazy tricks to get their bridges to notice IP address changes (see ticket 1913). The new behavior is to reinstate an every-60-seconds check for both public relays and bridge relays, now that the side effect is gone.
* Stop trying to resolve our hostname so oftenRoger Dingledine2013-02-11
| | | | | | | | For example, we were doing a resolve every time we think about doing a directory fetch. Now we reuse the cached answer in some cases. Fixes bugs 1992 (bugfix on 0.2.0.20-rc) and 2410 (bugfix on 0.1.2.2-alpha).
* Teach resolve_my_address() to return a cached answerRoger Dingledine2013-02-11
| | | | I didn't make any of the callers use this feature yet.
* Fix a nigh-impossible overflow in cpuworker.cNick Mathewson2013-02-11
| | | | | | | | | | When we compute the estimated microseconds we need to handle our pending onionskins, we could (in principle) overflow a uint32_t if we ever had 4 million pending onionskins before we had any data about how onionskins take. Nevertheless, let's compute it properly. Fixes bug 8210; bugfix on 0.2.4.10. Found by coverity; this is CID 980651.
* Fix a null-deref-on-fail in unit testsNick Mathewson2013-02-11
| | | | | | | | If geoip_format_bridge_stats() returned NULL when it should have returned a string, we would have tried to deref NULL, and died. Not a big deal in the unit tests, but still worth fixing. Found by coverity; This is CID 743384.
* oops; add a missing semicolonNick Mathewson2013-02-11
|
* Merge remote-tracking branch 'public/bug7816_023'Nick Mathewson2013-02-11
|\
| * Fix another memory leakNick Mathewson2013-02-11
| | | | | | | | | | This one occurs when changing configuration options. Found by coverity.
* | Merge remote-tracking branch 'public/bug8208'Nick Mathewson2013-02-11
|\ \
| * | Check whether ei is non-NULL before altering it.Nick Mathewson2013-02-11
| | | | | | | | | | | | | | | | | | | | | This fixes a crash bug if we fail to generate an extrainfo descriptor. Fixes bug 8208; bugfix on 0.2.3.16-alpha.
* | | Suppress a coverity false positive in connection_edge_package_raw_inbufNick Mathewson2013-02-11
| | | | | | | | | | | | | | | | | | | | | Coverity is worried that we're checking entry_conn in some cases, but not in the case where we set entry_conn->pending_optimistic_data. This commit should calm it down (CID 718623).
* | | Fix even more dead code and resource leaks in the unit testsNick Mathewson2013-02-11
| | | | | | | | | | | | Found by coverity
* | | Fix a very short-lived socket leak in tor-resolveNick Mathewson2013-02-11
| | | | | | | | | | | | | | | | | | | | | This shouldn't actually matter, since tor-resolve will return soon after this function exits, but it's nice to be warning-free Found by coverity, fixes CID 718633
* | | Resolve memory leaks in the unit tests and benchmarks (found by coverity)Nick Mathewson2013-02-11
| | | | | | | | | | | | These shouldn't really matter, but it's nice to be leak-free.
* | | Fix a copy-and-paste issue found by coverityNick Mathewson2013-02-11
| | | | | | | | | | | | Fixes CID 980650; bugfix on 0.2.4.10-alpha.
* | | Speed up the curve25519 unit test by doing fewer iterationsNick Mathewson2013-02-11
| | | | | | | | | | | | | | | This test was accounting for about 2/3 of our unit tests' runtime, even on systems with a fast curve25519. No test should take so long.
* | | Merge remote-tracking branch 'public/bug8158'Nick Mathewson2013-02-11
|\ \ \
| * | | Add doxygen for bug8158 functionsNick Mathewson2013-02-08
| | | |
| * | | Coalesce identical adjacent microdescriptor vote lines.Nick Mathewson2013-02-08
| | | |
| * | | Refactor generating the m lines in a vote into its own functionNick Mathewson2013-02-08
| | | |
* | | | Avoid generating extra spaces when explaining how we guessed our addressNick Mathewson2013-02-11
| | | |
* | | | Refactor resolve_my_address() so logs are more accurate / helpfulRoger Dingledine2013-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It returns the method by which we decided our public IP address (explicitly configured, resolved from explicit hostname, guessed from interfaces, learned by gethostname). Now we can provide more helpful log messages when a relay guesses its IP address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves ticket 2267. While we're at it, stop sending a stray "(null)" in some cases for the server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.
* | | | log the hostname that resolve_my_address() used to guess our IPRoger Dingledine2013-02-11
| | | |
* | | | Merge remote-tracking branch 'public/bug7801_v2'Nick Mathewson2013-02-11
|\ \ \ \
| * | | | Improve comment at Andrea's requestNick Mathewson2013-02-08
| | | | |
| * | | | changes file for bug7801Nick Mathewson2013-02-08
| | | | |
| * | | | Unit test for tor_weak_random_rangeNick Mathewson2013-02-08
| | | | |
| * | | | Add explicit check for !first_conn in ...resume_edge_reading_helperNick Mathewson2013-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check isn't necessary (see comment on #7801), but it took at least two smart people a little while to see why it wasn't necessary, so let's have it in to make the code more readable.
| * | | | Improve comment about our random stream choice algorithmNick Mathewson2013-02-08
| | | | |
| * | | | Fix numerous problems with Tor's weak RNG.Nick Mathewson2013-02-08
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Wrap more macro definitions in (parentheses)Nick Mathewson2013-02-09
| | | | | | | | | | | | | | | | | | | | | | | | To avoid surprises, good coding practice suggests parenthesizing every macro definition -- or at the very least, all those involving an expression.
* | | | Merge remote-tracking branch 'public/signof_enum'Nick Mathewson2013-02-08
|\ \ \ \ | |/ / / |/| | |
| * | | Have autoconf check whether enums are signed.Nick Mathewson2013-02-07
| | | | | | | | | | | | | | | | Fixes bug 7727; fix on 0.2.4.10-alpha.
| * | | Use a nicely written autoconf macro to determine the sign of a typeNick Mathewson2013-02-07
| | | | | | | | | | | | | | | | This beats our old implementation, which wouldn't work when cross-compiling
* | | | Merge remote-tracking branch 'karsten/geoip-manual-update'Nick Mathewson2013-02-08
|\ \ \ \
| * | | | Comment out now obsolete change in geoip-manual.Karsten Loesing2013-02-08
| | | | |
* | | | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2013-02-08
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| |
| * | | Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson2013-02-08
| |\ \ \
| | * | | Update to the February 2013 GeoIP database.Karsten Loesing2013-02-08
| | | | |
* | | | | Merge remote-tracking branch 'public/easy_ratelim'Nick Mathewson2013-02-07
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | Conflicts: src/or/connection.c
| * | | | Use log_fn_ratelim in a few places.Nick Mathewson2012-12-26
| | | | |
| * | | | Wrapper function for the common rate-limited-log pattern.Nick Mathewson2012-12-26
| | | | |
* | | | | Merge remote-tracking branch 'arma/bug7054'Nick Mathewson2013-02-07
|\ \ \ \ \
| * | | | | Say "KBytes" rather than "KB" in the man pageRoger Dingledine2012-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (for various values of K), to further reduce confusion about whether Tor counts in units of memory or fractions of units of memory. Fixes bug 7054.
* | | | | | Merge remote-tracking branch 'public/bug7816_023'Nick Mathewson2013-02-07
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | Conflicts: src/common/util.c
| * | | | | Fix various small leaks on error casesNick Mathewson2012-12-28
| | | | | | | | | | | | | | | | | | | | | | | | Spotted by coverity, bug 7816, bugfix on various versions.
| * | | | | Avoid leaking headers received from SSL proxyNick Mathewson2012-12-28
| | | | | | | | | | | | | | | | | | | | | | | | Fixes part of 7816. Spotted by coverity. Fix on 0.2.2.1-alpha.
| * | | | | Fix memory leak in safe-cookie authentication codeNick Mathewson2012-12-28
| | | | | | | | | | | | | | | | | | | | | | | | Coverity spotted this. Bug 7816. Fix on 0.2.3.13-alpha.
* | | | | | Merge remote-tracking branch 'public/bug7816_024'Nick Mathewson2013-02-07
|\ \ \ \ \ \