summaryrefslogtreecommitdiff
path: root/src/or/entrynodes.c
AgeCommit message (Collapse)Author
2018-04-22Check for "the right descriptor", not just "any descriptor".Nick Mathewson
This patch adds a new node_has_preferred_descriptor() function, and replaces most users of node_has_descriptor() with it. That's an important change, since as of d1874b433953f64 (our fix for #25213), we are willing to say that a node has _some_ descriptor, but not the _right_ descriptor for a particular use case. Part of a fix for 25691 and 25692.
2018-01-31circ: Don't cannibalize a circuit if the guard state is unusableDavid Goulet
Tor preemptiely builds circuits and they can be cannibalized later in their lifetime. A Guard node can become unusable (from our guard state) but we can still have circuits using that node opened. It is important to not pick those circuits for any usage through the cannibalization process. Fixes #24469 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-18finish documentation on live_consensus_is_missingNick Mathewson
2017-12-12Merge branch 'maint-0.3.2'Nick Mathewson
2017-12-12Merge branch 'bug24367_032_squashed' into maint-0.3.2Nick Mathewson
2017-12-12Make sure bridges are definitely running before delaying directory fetchesteor
Retry directory downloads when we get our first bridge descriptor during bootstrap or while reconnecting to the network. Keep retrying every time we get a bridge descriptor, until we have a reachable bridge. Stop delaying bridge descriptor fetches when we have cached bridge descriptors. Instead, only delay bridge descriptor fetches when we have at least one reachable bridge. Fixes bug 24367; bugfix on 0.2.0.3-alpha.
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-11-30Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-30Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2017-11-30Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-11-28Guard: Don't pick ourselves as a possible GuardDavid Goulet
TROVE-2017-12. Severity: Medium Thankfully, tor will close any circuits that we try to extend to ourselves so this is not problematic but annoying. Part of #21534.
2017-11-22Avoid crashing if we call num_usable_bridges() when bridges are not enabledteor
This applies the changes in 23524 to num_usable_bridges(), because it has replaced any_bridge_descriptors_known(). The original changes file still applies.
2017-11-22Stop checking cached bridge descriptors for usable bridgesteor
Stop checking for bridge descriptors when we actually want to know if any bridges are usable. This avoids potential bootstrapping issues. Fixes bug 24367; bugfix on 0.2.0.3-alpha. Stop stalling when bridges are changed at runtime. Stop stalling when old bridge descriptors are cached, but they are not in use. Fixes bug 24367; bugfix on 23347 in 0.3.2.1-alpha.
2017-11-20Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-20Merge branch 'bug23817_031' into maint-0.3.2Nick Mathewson
2017-11-20Check number of usable guards when applying md restrictions.George Kadianakis
We used to check whether we have enough filtered guards (guard set when torrc is applied) but that's not good enough, since that might be bad in some cases where many guards are not reachable (might cause overblocking and hence reacahbility issues). We now check if we have enough reachable filtered guards before applying md restrictions which should prevent overblocking.
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Merge branch 'bug23817_031' into maint-0.3.2Nick Mathewson
2017-11-17Make should_set_md_dirserver_restriction() look at num filtered guardsNick Mathewson
This seems closer to what the code intended.
2017-11-17Skip dirserver restrictions in small networks.George Kadianakis
2017-11-17Introduce new guard restriction and use it to skip outdated dirs.George Kadianakis
2017-10-25Add a unittest that reveals the offending case of #23862.George Kadianakis
2017-10-03entrynodes: Better naming for dir info check functions.George Kadianakis
2017-10-03entrynodes: Error msg for missing guard descs is now more informative.George Kadianakis
2017-10-03entrynodes: Be specific about how many primary descriptors we miss.George Kadianakis
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-14Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-09-14Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-14entrynodes.c: fix syntax error around BUG() statementMartin Kepplinger
Fix those misplaced brackets. Signed-off-by: Martin Kepplinger <martink@posteo.de>
2017-07-01general formatting / whitespace / typo fixesRoger Dingledine
2017-06-29Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-06-29Merge branch 'trove-2017-006' into maint-0.3.0Nick Mathewson
2017-06-29Consider the exit family when applying guard restrictions.Nick Mathewson
When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code consider the exit family as well, and adds some (hopefully redundant) checks for the case where we lack a node_t for a guard but we have a bridge_info_t for it. Fixes bug 22753; bugfix on 0.3.0.1-alpha. Tracked as TROVE-2016-006 and CVE-2017-0377.
2017-06-28Merge remote-tracking branch 'asn/bug21969_bridges_030' into maint-0.3.0Nick Mathewson
2017-06-22Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-06-22Combine our "don't do this if no consensus" entryguards checksNick Mathewson
Suggested by asn on 22400 review.
2017-06-19Don't expand guard sample set unless consensus is "reasonably live"Nick Mathewson
Fixes what I think is the main root cause of 22400. Bugfix on 0.3.0.1-alpha.
2017-05-22Raise common code for creating circuit_guard_state_tNick Mathewson
This will help if we ever need to add more fields or change the semantics of existing fields.
2017-05-22Merge remote-tracking branch 'asn/bug21969_bridges'Nick Mathewson
2017-05-22Set guard state on bridge descriptor fetches.George Kadianakis
We used to not set the guard state in launch_direct_bridge_descriptor_fetch(). So when a bridge descriptor fetch failed, the guard subsystem would never learn about the fail (and hence the guard's reachability state would not be updated).
2017-05-22Set guard state on bridge descriptor fetches.George Kadianakis
We used to not set the guard state in launch_direct_bridge_descriptor_fetch(). So when a bridge descriptor fetch failed, the guard subsystem would never learn about the fail (and hence the guard's reachability state would not be updated).
2017-05-19fix typo in commentRoger Dingledine
2017-04-03Merge remote-tracking branch 'public/bug21415_testfix_030' into maint-0.3.0Nick Mathewson
2017-03-27Merge remote-tracking branch 'origin/maint-0.3.0'Nick Mathewson
2017-03-27Fix max sampled size logic when in bridge mode.George Kadianakis
When calculating max sampled size, Tor would only count the number of bridges in torrc, without considering that our state file might already have sampled bridges in it. This caused problems when people swap bridges, since the following error would trigger: [warn] Not expanding the guard sample any further; just hit the maximum sample threshold of 1
2017-03-15Run the copyright update script.Nick Mathewson
2017-03-09Revert "Restore correct behavior of 0.3.0.4-rc with bridges+ipv6-min"George Kadianakis
This reverts commit 5298ab59170be74aed20e04e5378ec66eef6476e.
2017-03-01Restore correct behavior of 0.3.0.4-rc with bridges+ipv6-minNick Mathewson
In that chutney test, the bridge client is configured to connect to the same bridge at 127.0.0.1:5003 _and_ at [::1]:5003, with no change in transports. That meant, I think, that the descriptor is only assigned to the first bridge when it arrives, and never the second.