summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-11-30Implement most of the prop271 data structure backends.Nick Mathewson
This code handles: * Maintaining the sampled set, the filtered set, and the usable_filtered set. * Maintaining the confirmed and primary guard lists. * Picking guards for circuits, and updating guard state when circuit state changes. Additionally, I've done code structure movement: even more constants and structures from entrynodes.c have become ENTRYNODES_PRIVATE fields of entrynodes.h. I've also included a bunch of documentation and a bunch of unit tests. Coverage on the new code is pretty high. I've noted important things to resolve before this branch is done with the /XXXX.*prop271/ regex.
2016-11-30Add a smartlist_remove_keeporder() function, with tests.Nick Mathewson
2016-11-30Add a GUARD log domain, for use with new guards codeNick Mathewson
2016-11-30Add parameters for new (prop271) guard algorithm.Nick Mathewson
These are taken from the proposal, and defined there. Some of them should turn into consensus parameters. Also, remove some dead code that was there to make compilation work, and use ATTR_UNUSED like a normal person.
2016-11-30Collect old guard algorithm parameters into one placeNick Mathewson
2016-11-30Add accessors as needed to repair compilationNick Mathewson
The previous commit, in moving a bunch of functions to bridges.c, broke compilation because bridges.c required two entry points to entrynodes.c it didn't have.
2016-11-30Split bridge functions into a new module.Nick Mathewson
This patch is just: * Code movement * Adding headers here and there as needed * Adding a bridges_free_all() with a call to it. It breaks compilation, since the bridge code needed to make exactly 2 calls into entrynodes.c internals. I'll fix those in the next commit.
2016-11-30Initial code to parse/encode/sample prop271 guardsNick Mathewson
The encoding code is very straightforward. The decoding code is a bit tricky, but clean-ish. The sampling code is untested and probably needs more work.
2016-11-30Teach parse_iso_time about the spaceless variant.Nick Mathewson
(We previously added support for generating the spaceless 2016-11-14T19:58:12 variant, but not for actually parsing it.)
2016-11-30Add the prop271 fields to entry_guard_t. Not used yet.Nick Mathewson
2016-11-30Whitespace fixes from previous mechanical search-and-replacesNick Mathewson
2016-11-30Make entry_guard_t opaque to circpathbias.cNick Mathewson
This was a relatively mechanical change. First, I added an accessor function for the pathbias-state field of a guard. Then I did a search-and-replace in circpathbias.c to replace "guard->pb." with "pb->". Finally, I made sure that "pb" was declared whenever it was needed.
2016-11-30Fix remaining case of circpathbias inspecting entryguard internalsNick Mathewson
2016-11-30Add an entry_guard_describe() functionNick Mathewson
This function helpfully removes all but one remaining use of an entry_guard_t private field in pathbias.c
2016-11-30Move path-bias fields into a separate structureNick Mathewson
(Other than the field movement, the code changes here are just search-and-replace)
2016-11-30prop271: make entry_guard_t mostly-privateNick Mathewson
The entry_guard_t structure should really be opaque, so that we can change its contents and have the rest of Tor not care. This commit makes it "mostly opaque" -- circpathbias.c can still see inside it. (I'm making circpathbias.c exempt since it's the only part of Tor outside of entrynodes.c that made serious use of entry_guard_t internals.)
2016-11-22Merge remote-tracking branch 'teor/fix-mingw-pagesize'Nick Mathewson
2016-11-21Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-21Merge remote-tracking branch 'arma/bug20423' into maint-0.2.9Nick Mathewson
2016-11-17Merge remote-tracking branch 'dgoulet/bug20629_030_01'Nick Mathewson
2016-11-17Merge remote-tracking branch 'public/bug20558'Nick Mathewson
2016-11-17Merge remote-tracking branch 'public/bug20630'Nick Mathewson
2016-11-17Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-17Merge remote-tracking branch 'dgoulet/bug20646_030_01'Nick Mathewson
2016-11-17Fix and simplify error handling code in rend_service_parse_port_config()Ivan Markin
2016-11-17Fix comment for rend_service_parse_port_config()Ivan Markin
2016-11-17Merge remote-tracking branch 'teor/bug20634_029' into maint-0.2.9Nick Mathewson
2016-11-16don't attempt a resolve when the cached answer will doRoger Dingledine
For relays that don't know their own address, avoid attempting a local hostname resolve for each descriptor we download. Also cut down on the number of "Success: chose address 'x.x.x.x'" log lines. Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha.
2016-11-16refactor router_pick_published_address to have another argRoger Dingledine
no change in behavior except fewer log entries in the case where we use a cached result.
2016-11-16finish_writing_to_file_impl(): Remove temporary file if replacing the ↵Fabian Keil
existing one failed Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-16fixup! Add expect_log_msg_containing_either3() and ↵teor
expect_log_msg_containing_either4() Fix typos: * extra '(' * use assert_log_predicate (without 3 or 4 at the end) Tidy whitespace. Wrap long lines.
2016-11-16Add all four error messages to test_address_get_if_addrs6_list_no_internal()Neel Chauhan
2016-11-16Add all four error messages to test_address_get_if_addrs6_list_internal()Neel Chauhan
2016-11-16Add expect_log_msg_containing_either3() and expect_log_msg_containing_either4()Neel Chauhan
2016-11-14Fix a "shouldn't have reached this" warning in connection_edge.cNick Mathewson
This was bug 20630; bugfix on f3e158ed where I thought I was committing a documentation-only fix but instead messed up the control flow too.
2016-11-10hs: Remove pointless NULL check found by CoverityDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-10Merge remote-tracking branch 'dgoulet/bug20570_030_01'Nick Mathewson
2016-11-10Merge remote-tracking branch 'dgoulet/bug20567_030_01'Nick Mathewson
2016-11-10Merge remote-tracking branch 'public/feature20552'Nick Mathewson
2016-11-10Merge remote-tracking branch 'dgoulet/ticket19642_030_01'Nick Mathewson
2016-11-10Add "TByte" and "TBytes" units; also add "TBits" to man pageMatt Nordhoff
2016-11-10Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-10Merge remote-tracking branch 'teor/bug20613' into maint-0.2.9Nick Mathewson
2016-11-08Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-09Stop logging single onion and Tor2web long-term one-hop circuitsteor
Single onion services and Tor2web deliberately create long-term one-hop circuits to their intro and rend points, respectively. These log messages are intended to diagnose issue 8387, which relates to circuits hanging around forever for no reason. Fixes bug 20613; bugfix on 0.2.9.1-alpha. Reported by "pastly".
2016-11-08In torrc.sample.in, note that bandwidth must be >=75 KB.Nick Mathewson
Queue a corresponding change for torrc.minimal.in. Closes ticket 20085.
2016-11-09Call get_options() once at the top of circuit_log_ancient_one_hop_circuits()teor
Refactoring, no behaviour change.
2016-11-08Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-08Merge remote-tracking branch 'public/bug20306_029' into maint-0.2.9Nick Mathewson
2016-11-08Merge branch 'maint-0.2.9'Nick Mathewson