aboutsummaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2013-02-11Fix two more coverity-spotted leaks in master.Nick Mathewson
One is a probably-impossible leak if we fail to sign a consensus; another occurs when we can't look up the user we're trying to chown our sockets to.
2013-02-11Avoid null-pointer deref in pathbias_is_new_circ_attemptNick Mathewson
Coverity is worried about this (CID 980653). It hasn't happened in testing, but we might as well make sure it can't happen.
2013-02-11Fix a nigh-impossible overflow in cpuworker.cNick Mathewson
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.
2013-02-11oops; add a missing semicolonNick Mathewson
2013-02-11Merge remote-tracking branch 'public/bug7816_023'Nick Mathewson
2013-02-11Fix another memory leakNick Mathewson
This one occurs when changing configuration options. Found by coverity.
2013-02-11Merge remote-tracking branch 'public/bug8208'Nick Mathewson
2013-02-11Check whether ei is non-NULL before altering it.Nick Mathewson
This fixes a crash bug if we fail to generate an extrainfo descriptor. Fixes bug 8208; bugfix on 0.2.3.16-alpha.
2013-02-11Suppress a coverity false positive in connection_edge_package_raw_inbufNick Mathewson
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).
2013-02-11Fix a copy-and-paste issue found by coverityNick Mathewson
Fixes CID 980650; bugfix on 0.2.4.10-alpha.
2013-02-11Merge remote-tracking branch 'public/bug8158'Nick Mathewson
2013-02-11Avoid generating extra spaces when explaining how we guessed our addressNick Mathewson
2013-02-11Refactor resolve_my_address() so logs are more accurate / helpfulRoger Dingledine
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.
2013-02-11log the hostname that resolve_my_address() used to guess our IPRoger Dingledine
2013-02-11Merge remote-tracking branch 'public/bug7801_v2'Nick Mathewson
2013-02-09Wrap more macro definitions in (parentheses)Nick Mathewson
To avoid surprises, good coding practice suggests parenthesizing every macro definition -- or at the very least, all those involving an expression.
2013-02-08Add explicit check for !first_conn in ...resume_edge_reading_helperNick Mathewson
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.
2013-02-08Improve comment about our random stream choice algorithmNick 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-08Add doxygen for bug8158 functionsNick Mathewson
2013-02-08Coalesce identical adjacent microdescriptor vote lines.Nick Mathewson
2013-02-08Refactor generating the m lines in a vote into its own functionNick Mathewson
2013-02-07Merge remote-tracking branch 'public/easy_ratelim'Nick Mathewson
Conflicts: src/or/connection.c
2013-02-07Merge remote-tracking branch 'public/bug7816_023'Nick Mathewson
Conflicts: src/common/util.c
2013-02-07Merge remote-tracking branch 'public/bug7816_024'Nick Mathewson
2013-02-07Merge branch 'bug7902'Nick Mathewson
2013-02-07Merge branch 'ticket8161_squashed'Nick Mathewson
2013-02-07Mention a trac ticket relevant to an XXX comment.Mike Perry
2013-02-07Better document an XXX comment about refactoring.Mike Perry
2013-02-07Separate the flags for logging use bias.Mike Perry
I think we want both sets of messages to appear independently to help us know what needs tuning.
2013-02-04Lower path use bias thresholds.Mike Perry
I noticed bad wifi networks can have low use success rates.
2013-02-04Include a flag-thresholds line in each vote to describe flag cutoffsNick Mathewson
Implements ticket 8151.
2013-02-04Merge branch 'authdir_quick_fix'Nick Mathewson
2013-02-04Merge branch 'bug8146_etc'Nick Mathewson
2013-02-04Quick fix on 5956 for authoritiesNick Mathewson
Authorities don't set is_possible_guard on node_t, so they were never deciding that they could build enough paths. This is a quick and dirty fix. Bug not in any released version of Tor
2013-02-04Merge branch 'bug8153'Nick Mathewson
2013-02-04Reinstate some fixes/tweaks from 6e4a4002Nick Mathewson
These seem to have gotten conflicted out of existence while mike was working on path bias stuff. Thanks to sysrqb for collecting these in a handy patch.
2013-02-04Fix a warning when building with --disable-curve25519Nick Mathewson
It appears that the code for 7291 gave an unused-value warning when built with --disable-curve25519.
2013-02-04When we mark a node as a sybil, mark it down and reset its uptime to 0Nick Mathewson
This prevents bug 8147, where such nodes would accrue points towards Guard, Fast, HSDir, and so on. Fixes bug 8147.
2013-02-04Ignore tiny bandwidths entirely when computing thresholdsNick Mathewson
Another bug 8145 fix.
2013-02-04Increase the minimum value for the Fast flag to 4096.Nick Mathewson
Fix for 8145.
2013-02-04Refactor should-count-towards-thresholds test into new functionNick Mathewson
2013-02-04When computing performance thresholds, ignore omitted-as-sybil nodes.Nick Mathewson
Fixes bug 8146.
2013-02-01Merge remote-tracking branch 'public/feature7706'Nick Mathewson
2013-02-01Merge remote-tracking branch 'public/bug7708_023_v3_squashed'Nick Mathewson
2013-02-01Clarify documentation of connection_finished_flushingNick Mathewson
2013-02-01Fix serious breakage in connection_handle_write_implNick Mathewson
When we first implemented TLS, we assumed in conneciton_handle_write that a TOR_TLS_WANT_WRITE from flush_buf_tls meant that nothing had been written. But when we moved our buffers to a ring buffer implementation back in 0.1.0.5-rc (!), we broke that invariant: it's possible that some bytes have been written but nothing. That's bad. It means that if we do a sequence of TLS writes that ends with a WANTWRITE, we don't notice that we flushed any bytes, and we don't (I think) decrement buckets. Fixes bug 7708; bugfix on 0.1.0.5-rc
2013-02-01Fix a couple of warnings on the 8081 branch.Nick Mathewson
2013-02-01Add EntryGuardPathUseBias to state file keyword list.Mike Perry
2013-02-01Increment an informational counter for use failed state.Mike Perry
This informational counter is probably now redundant, but might as well keep it consistent I guess.