summaryrefslogtreecommitdiff
path: root/src/or/entrynodes.c
AgeCommit message (Collapse)Author
2017-02-09Change "prop271" in XXXXs about guard Ed identity to refer to #20872.Nick Mathewson
2017-02-01Merge remote-tracking branch 'asn/bug21052'Nick Mathewson
2017-02-01Merge branch 'bug21242'Nick Mathewson
2017-02-01Merge remote-tracking branch 'public/bug21129'Nick Mathewson
2017-01-31When marking guard state instances on a channel, don't mark NULLNick Mathewson
It's okay for guard_state to be null: we might have a fallback circuit, or we might not be using guards. Fixes bug 211228; bugfix on 0.3.0.1-alpha
2017-01-31Don't try to use confirmed_idx in remove_guard_from_...lists()Nick Mathewson
Since we can call this function more than once before we update all the confirmed_idx fields, we can't rely on all the relays having an accurate confirmed_idx. Fixes bug 21129; bugfix on 0.3.0.1-alpha
2017-01-31Don't build circuits till primary guards have descriptorsNick Mathewson
In addition to not wanting to build circuits until we can see most of the paths in the network, and in addition to not wanting to build circuits until we have a consensus ... we shouldn't build circuits till all of our (in-use) primary guards have descriptors that we can use for them. This is another bug 21242 fix.
2017-01-31Don't (usually) return any guards that are missing descriptors.Nick Mathewson
Actually, it's _fine_ to use a descriptorless guard for fetching directory info -- we just shouldn't use it when building circuits. Fortunately, we already have a "usage" flag that we can use here. Partial fix for bug 21242.
2017-01-31entry_guard_pick_for_circuit(): TRAFFIC guards must have descriptorsNick Mathewson
This relates to the 21242 fix -- entry_guard_pick_for_circuit() should never yield nodes without descriptors when the node is going to be used for traffic, since we won't be able to extend through them.
2017-01-30entrynodes: Remove "split these functions" XXXXsNick Mathewson
They now have a ticket: #21349.
2017-01-30Remove prop271 "spec deviation" comments -- the spec has been updatedNick Mathewson
In some cases, replace those comments with better ones.
2017-01-24Repair the (deprecated, ugly) DROPGUARDS controller function.Nick Mathewson
This actually is much easier to write now that guard_selection_t is first-class.
2017-01-24Remove some more remnants of legacy guard selection.George Kadianakis
2017-01-18Remove argument from guards_choose_dirguardNick Mathewson
2017-01-18Remove some now-spurious blocks and indentation.Nick Mathewson
2017-01-18Remove GS_TYPE_LEGACYNick Mathewson
2017-01-18Remove UseDeprecatedGuardAlgorithm.Nick Mathewson
2017-01-18Remove the (no longer compiled) code for legacy guard selection.Nick Mathewson
Part of 20830.
2017-01-17prop271: Move new funcs to top, to avoid compiler warnings.George Kadianakis
2017-01-17prop271: When we exhaust all guards, mark all of them for retry.George Kadianakis
In the past, when we exhausted all guards in our sampled set, we just waited there till we mark a guard for retry again (usually takes 10 mins for a primary guard, 1 hour for a non-primary guard). This patch marks all guards as maybe-reachable when we exhaust all guards (this can happen when network is down for some time).
2017-01-02Make GETINFO entry-guards work again with prop271Nick Mathewson
This is not a great solution, but it's as close to backward-compatible as possible. A better GETINFO API should expose more information.
2016-12-16Rename 'remove' -> 'rmv' to avoid shadowing a libc globalNick Mathewson
2016-12-16Resolve a division-by-zero complaint from coverity. CID 1397272Nick Mathewson
2016-12-16Merge branch 'ticket20831_v2'Nick Mathewson
2016-12-16Make NumDirectoryGuards work with the new guard algorithm.Nick Mathewson
Now that we support NumEntryGuards, NumDirectoryGuards is pretty easy to put back in.
2016-12-16Make NumEntryGuards work as expected again.Nick Mathewson
Further, add a "guard-n-primary-guards-to-use" parameter, defaulting to 1, for NumEntryGuards to override.
2016-12-16271: Algorithm tweak to allow multiple entry guards.Nick Mathewson
Previously, we had NumEntryGuards kind of hardwired to 1. Now we have the code (but not the configuarability) to choose randomly from among the first N primary guards that would work, where N defaults to 1. Part of 20831 support for making NumEntryGuards work again.
2016-12-16Respect GuardLifetime in prop271 code.Nick Mathewson
It overrides both the GUARD_LIFETIME and the GUARD_CONFIRMED_MIN_LIFETIME options.
2016-12-16Merge branch 'ticket20826_v2'Nick Mathewson
2016-12-16Support restrictive ENTRYNODES configurations correctly.Nick Mathewson
Since we already had a separate function for getting the universe of possible guards, all we had to do was tweak it to handle very the GS_TYPE_RESTRICTED case.
2016-12-16guard->nickname is never NULL.Nick Mathewson
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Per suggestion, increase the retry frequency for primary guards.Nick Mathewson
2016-12-16Rewrite state transition logic in entry_guards_note_success()Nick Mathewson
asn found while testing that this function can be reached with GUARD_STATE_COMPLETE circuits; I believe this happens when cannibalization occurs. The added complexity of handling one more state made it reasonable to turn the main logic here into a switch statement.
2016-12-16Add a separate, non-fractional, limit to the sampled guard set size.Nick Mathewson
Letting the maximum sample size grow proportionally to the number of guards defeats its purpose to a certain extent. Noted by asn during code review. Fixes bug 20920; bug not in any released (or merged) version of Tor.
2016-12-16Clean check for live consensus when updating the guard sample.Nick Mathewson
The valid_until check was redundant.
2016-12-16Move a TODO comment into doxygen comments.Nick Mathewson
2016-12-16Easy code fixes.George Kadianakis
- Correctly maintain the previous guard selection in choose_guard_selection(). - Print bridge identifier instead of nothing in entry_guard_describe()._
2016-12-16Trivial documentation improvements.George Kadianakis
2016-12-16Wrap all of the legacy guard code, and its users, in #ifdefsNick Mathewson
This will make it easier to see what we remove down the line.
2016-12-16Fix a signed/unsigned warning on 32-bitNick Mathewson
2016-12-16Don't make $hexid nicknames persistent.Nick Mathewson
(That's asking for trouble, and also totally completely redundant.)
2016-12-16prop271: Tests for the highlevel or_state_t encode/decode functionsNick Mathewson
2016-12-16Extract guard_selection_infer_type into its own function.Nick Mathewson
2016-12-16Another tweak for guard restrictions: don't let complete circs blockNick Mathewson
If a complete circuit C2 doesn't obey the restrictions of C1, then C2 cannot block C1. The patch here is a little big-ish, since we can no longer look through all the complete circuits and all the waiting circuits on a single pass: we have to find the best waiting circuit first.
2016-12-16Implement support for per-circuit guard restrictions.Nick Mathewson
This is an important thing I hadn't considered when writing prop271: sometimes you have to restrict what guard you use for a particular circuit. Most frequently, that would be because you plan to use a certain node as your exit, and so you can't choose that for your guard. This change means that the upgrade-waiting-circuits algorithm needs a slight tweak too: circuit A cannot block circuit B from upgrading if circuit B needs to follow a restriction that circuit A does not follow.
2016-12-16guards_choose_dirguard(): replace one XXXX with another.Nick Mathewson
I had been asking myself, "hey, doesn't the new code need to look at this "info" parameter? The old code did!" But it turns out that the old code hasn't, since 05f7336624d6a47b3. So instead of "support this!" the comment now says "we can remove this!"
2016-12-16Fix a magic number in get_max_sample_sizeNick Mathewson
2016-12-16Note a couple of XXX-prop271s as spec deviations.Nick Mathewson
2016-12-16Remove some resolved "XXXX prop271" comments.Nick Mathewson