aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-05-08Merge branch 'netflow_padding-v6-rebased2-squashed'Nick Mathewson
2017-05-08Fix some channelpadding test issues.Mike Perry
asan was finding an alignment issue with a cast, so set the field in the trunnel struct and then encode it instead. Also, enable log capture and verification.
2017-05-08Fix issues from dgoulet's code review.Mike Perry
https://gitlab.com/dgoulet/tor/merge_requests/24
2017-05-08Cache netflow-related consensus parameters.Mike Perry
Checking all of these parameter lists for every single connection every second seems like it could be an expensive waste. Updating globally cached versions when there is a new consensus will still allow us to apply consensus parameter updates to all existing connections immediately.
2017-05-08Fix a breakage in test_options.c.Mike Perry
IMO, these tests should be calling options_init() to properly set everything to default values, but when that is done, about a dozen tests fail. Setting the one default value that broke the tests for my branch. Sorry for being lame.
2017-05-08Remove a PredictedPortsRelevantTime test.Mike Perry
The option was deprecated by bug #17592.
2017-05-08Bug 17604: Converge on only one long-lived TLS conn between relays.Mike Perry
Accomplished via the following: 1. Use NETINFO cells to determine if both peers will agree on canonical status. Prefer connections where they agree to those where they do not. 2. Alter channel_is_better() to prefer older orconns in the case of multiple canonical connections, and use the orconn with more circuits on it in case of age ties. Also perform some hourly accounting on how many of these types of connections there are and log it at info or notice level.
2017-05-08Bug 17592: Clean up connection timeout logic.Mike Perry
This unifies CircuitIdleTimeout and PredictedCircsRelevanceTime into a single option, and randomizes it. It also gives us control over the default value as well as relay-to-relay connection lifespan through the consensus. Conflicts: src/or/circuituse.c src/or/config.c src/or/main.c src/test/testing_common.c
2017-05-08Netflow record collapsing defense.Mike Perry
This defense will cause Cisco, Juniper, Fortinet, and other routers operating in the default configuration to collapse netflow records that would normally be split due to the 15 second flow idle timeout. Collapsing these records should greatly reduce the utility of default netflow data for correlation attacks, since all client-side records should become 30 minute chunks of total bytes sent/received, rather than creating multiple separate records for every webpage load/ssh command interaction/XMPP chat/whatever else happens to be inactive for more than 15 seconds. The defense adds consensus parameters to govern the range of timeout values for sending padding packets, as well as for keeping connections open. The defense only sends padding when connections are otherwise inactive, and it does not pad connections used solely for directory traffic at all. By default it also doesn't pad inter-relay connections. Statistics on the total padding in the last 24 hours are exported to the extra-info descriptors.
2017-05-08Merge branch 'maint-0.3.0'Nick Mathewson
2017-05-08Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-05-08Merge branch 'bug21943_029' into maint-0.2.9Nick Mathewson
2017-05-08Merge remote-tracking branch 'ahf/coverity/1405875'Nick Mathewson
2017-05-08Merge branch 'maint-0.3.0'Nick Mathewson
2017-05-08Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-05-08Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-05-08Merge branch 'maint-0.2.7-redux' into maint-0.2.8Nick Mathewson
2017-05-08Merge branch 'maint-0.2.6' into maint-0.2.7-reduxNick Mathewson
2017-05-08Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2017-05-08Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2017-05-08Update geoip and geoip6 to the May 2 2017 database.Karsten Loesing
2017-05-05Merge remote-tracking branch 'dgoulet/ticket21978_031_02'Nick Mathewson
2017-05-05Remove dead code in test_options_validate_impl().Alexander Færøy
Dead branch found by Coverity in CID #1405875.
2017-05-05Fix memory leak found in CID #1405876.Alexander Færøy
2017-05-04Grammar fix in a log messageNick Mathewson
2017-05-04Fix: our directory.c code expects header constants to end with a :Nick Mathewson
2017-05-04Do not BUG on missing sha3-as-signed fieldNick Mathewson
This can happen if you've been running an earlier alpha on your relay. Instead, just ignore the entry.
2017-05-04Update the consdiff directory code based on #22143 fixesNick Mathewson
These are mostly just identifier renames, except for one place in routerparse.c where we switch to using a correct hash.
2017-05-04Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a constNick Mathewson
2017-05-04Request (and try to use) consensus diffs.Nick Mathewson
2017-05-04Generate X-Or-Diff-From-Consensus headers correctly.Nick Mathewson
2017-05-04Remove excess indentation from previous commit.Nick Mathewson
Review this with 'diff -b' to confirm
2017-05-04Extract the consensus-only part of directory_get_from_dirserverNick Mathewson
Right now it just sets an if-modified-since header, but it's about to get even bigger. This patch avoids changing indentation; the next patch will be whitespace fixes.
2017-05-04New function to add additional headers to a directory requestNick Mathewson
2017-05-04Store the sha3 of a networkstatus as part of the networkstatus_tNick Mathewson
Also store it in the cached_dir_t.
2017-05-04Serve consensus diffs on request.Nick Mathewson
2017-05-04Support writing Content-Encoding headers other than deflateNick Mathewson
Right now this only sends "deflate" or "identity", but there's more to come.
2017-05-04Remove old unused indentation from handle_get_current_consensusNick Mathewson
This commit removes a pair of meaningless braces, and changes whitespace only.
2017-05-04Add consensus_cache_entry spooling support to spooled_resource_tNick Mathewson
2017-05-04Merge branch 'ticket22143_squashed'Nick Mathewson
2017-05-04Add a test for $ with non-delete commands.Nick Mathewson
2017-05-04Remove some unused digests from test_consdiffmgr.cNick Mathewson
These were unused before I started working on #22143 -- I just found them while I was lookinging for digests to update.
2017-05-04bug#22143/prop#140: in consdiffmgr, store and use digest-as-signedNick Mathewson
We need to index diffs by the digest-as-signed of their source consensus, so that we can find them even from consensuses whose signatures are encoded differently.
2017-05-04bug#22143/prop#140: Use <n>,$d commands in diffs to remove signaturesNick Mathewson
In this patch I add support for "delete through end of file" in our ed diff handler, and generate our diffs so that they remove everything after in the consensus after the signatures begin.
2017-05-03Fix additional leaks in #22103 testsTaylor Yu
test_options_validate_impl() incorrectly executed subsequent phases of config parsing and validation after an expected error. This caused msg to leak when those later phases (which would likely produce errors as well) overwrote it.
2017-05-03bug#22143/prop#140: identify input diffs by their digest-as-signedNick Mathewson
See may 3 changes to prop140 for more background.
2017-05-03Merge remote-tracking branch 'argonblue/bug22103_fixtest'Nick Mathewson
2017-05-03control: Fix NULL pointer access in HS desc eventDavid Goulet
This was introduced 90562fc23a7ce61f3660b507d9991a27af2eae37 adding a code path where we pass a NULL pointer for the HSDir fingerprint to the control event subsystem. The HS desc failed function wasn't handling properly that pointer for a NULL value. Two unit tests are also added in this commit to make sure we handle properly the case of a NULL hsdir fingerprint and a NULL content as well. Fixes #22138 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-03Fix memory management for #22103 testsTaylor Yu
Code movement in the commit introducings tests for #22103 uncovered a latent memory management bug. Refactor the log message checking from test_options_checkmsgs() into a helper test_options_checklog(). This avoids a memory leak (and possible double-free) in a test failure condition. Don't reuse variables (especially pointers to allocated memory!) for multiple unrelated purposes. Fixes CID 1405778.
2017-05-02Merge branch 'refactor_dir_client_handler'Nick Mathewson