summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
AgeCommit message (Collapse)Author
2016-08-24Fix path selection on firewalled clientsteor
Signed-off-by: teor <teor2345@gmail.com>
2016-08-22Do not pass NULL to log(%s) in dir_server_new.Nick Mathewson
This bug had existed since 0.2.4.7-alpha, but now that we have FallbackDirs by default, it actually matters. Fixes bug 19947; bugfix on 0.2.4.7-alpha or maybe 0.2.8.1-alpha. Rubiate wrote the patch; teor wrote the changes file.
2016-07-01When tor can't find a directory, log lessteor (Tim Wilson-Brown)
2016-06-28whitespace fixesNick Mathewson
2016-06-28Merge remote-tracking branch 'teor/bug18812' into maint-0.2.8Nick Mathewson
2016-06-28Make it clear that fallbacks include authoritiesteor (Tim Wilson-Brown)
Comment-only change
2016-06-02Use directory_must_use_begindir to predict we'll surely use begindirNick Mathewson
Previously, we used !directory_fetches_from_authorities() to predict that we would tunnel connections. But the rules have changed somewhat over the course of 0.2.8
2016-05-25Fix a double-free bug in routerlist_reparse_oldNick Mathewson
I introduced this bug when I moved signing_key_cert into signed_descriptor_t. Bug not in any released Tor. Fixes bug 19175, and another case of 19128. Just like signed_descriptor_from_routerinfo(), routerlist_reparse_old() copies the fields from one signed_descriptor_t to another, and then clears the fields from the original that would have been double-freed by freeing the original. But when I fixed the s_d_f_r() bug [#19128] in 50cbf220994c7cec593, I missed the fact that the code was duplicated in r_p_o(). Duplicated code strikes again! For a longer-term solution here, I am not only adding the missing fix to r_p_o(): I am also extracting the duplicated code into a new function. Many thanks to toralf for patiently sending me stack traces until one made sense.
2016-05-20Fix a bug related to moving signing_key_certNick Mathewson
Now that the field exists in signed_descriptor_t, we need to make sure we free it when we free a signed_descriptor_t, and we need to make sure that we don't free it when we convert a routerinfo_t to a signed_descriptor_t. But not in any released Tor. I found this while working on #19128. One problem: I don't see how this could cause 19128.
2016-05-17whitespace fixesNick Mathewson
2016-05-17Remove duplicate siging_key_cert fields.Nick Mathewson
With the fix for #17150, I added a duplicate certificate here. Here I remove the original location in 0.2.8. (I wouldn't want to do that in 027, due to the amount of authority-voting-related code drift.) Closes 19073.
2016-05-17Merge branch 'bug17150_027_extra' into maint-0.2.8Nick Mathewson
2016-05-17Improve API of routerinfo_incompatible_with_extrainfo()Nick Mathewson
This API change makes it so that routerinfo_incompatible...() no longer takes a routerinfo_t, so that it's obvious that it should only look at fields from the signed_descriptor_t. This change should prevent a recurrence of #17150.
2016-05-17Fix another, more subtle, case of bug 17150.Nick Mathewson
We need to make sure that the corresponding sd and ei match in their certificates.
2016-05-17Copy the signing_key_cert field into signed_descriptor_tNick Mathewson
We need this field to be in signed_descriptor_t so that routerinfo_incompatible_with_extrainfo can work correctly (#17150). But I don't want to move it completely in this patch, since a great deal of the code that messes with it has been in flux since 0.2.7, when this ticket was opened. I should open another ticket about removing the field from routerinfo_t and extrainfo_t later on. This patch fixes no actual behavior.
2016-05-17Fix documentation for routerinfo_incompatible_with_extrainfoNick Mathewson
2016-05-17When making sure digest256 matches in ei, look at sd, not ri.Nick Mathewson
The routerinfo we pass to routerinfo_incompatible_with_extrainfo is the latest routerinfo for the relay. The signed_descriptor_t, on the other hand, is the signed_descriptor_t that corresponds to the extrainfo. That means we should be checking the digest256 match with that signed_descriptor_t, not with the routerinfo. Fixes bug 17150 (and 19017); bugfix on 0.2.7.2-alpha.
2016-05-17Move extra_info_digest256 into signed_descriptor_tNick Mathewson
This patch includes no semantic changes; it's just a field movement. It's prerequisite for a fix to 19017/17150.
2016-05-11Confim we want certificates from fallbacksteor (Tim Wilson-Brown)
Comment-only change
2016-05-11Revert "Switch between fallback and authority when auth cert fetch fails"teor (Tim Wilson-Brown)
This reverts commit 92d7ee08b8c51b4b29f68c6d00ca4aa91ea5a66b.
2016-05-10Switch between fallback and authority when auth cert fetch failsteor (Tim Wilson-Brown)
2016-05-10Use the consensus download schedule for authority certificatesteor (Tim Wilson-Brown)
Previously, we were using the generic schedule for some downloads, and the consensus schedule for others. Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha.
2016-05-05Refactor router_pick_directory_server_impl to use node functionsteor (Tim Wilson-Brown)
No behavioural change This makes the use of the node explicit in the function, rather than hiding the node lookup in fascist_firewall_allows_rs.
2016-05-05Rename skip_or and skip_dir to avoid confusionteor (Tim Wilson-Brown)
Variable rename only
2016-05-05Merge branch 'feature18483-028-v2-squashed' into maint-0.2.8Nick Mathewson
2016-05-05Make clients only select directories with reachable ORPortsteor (Tim Wilson-Brown)
This makes sure clients will only select relays which support begindir over ORPort.
2016-05-05Make directory node selection more reliableteor (Tim Wilson-Brown)
Delete an unnecessary check for non-preferred IP versions. Allows clients which can't reach any directories of their preferred IP address version to get directory documents. Patch on #17840 in 0.2.8.1-alpha.
2016-03-26Do not treat "DOCDOC" as doxygen.Nick Mathewson
2016-03-24Merge remote-tracking branch 'teor/bug18351'Nick Mathewson
2016-03-24Check if fallbacks support extrainfo descriptors before requesting themteor (Tim Wilson-Brown)
When requesting extrainfo descriptors from a trusted directory server, check whether it is an authority or a fallback directory which supports extrainfo descriptors. Fixes bug 18489; bugfix on 90f6071d8d in tor-0.2.4.7-alpha. Reported by "atagar", patch by "teor".
2016-03-24Code indentation whitespace-only fixteor (Tim Wilson-Brown)
2016-03-24Clarify ReachableAddress log messagesteor (Tim Wilson-Brown)
Make it clearer that they are about outgoing connection attempts. Specify the options involved where they were missing from one log message. Clarify a comment.
2016-03-24Downgrade IP version warnings to avoid filling logsteor (Tim Wilson-Brown)
Downgrade logs and backtraces about IP versions to info-level. Only log backtraces once each time tor runs. Assists in diagnosing bug 18351; bugfix on c3cc8e16e in tor-0.2.8.1-alpha. Reported by "sysrqb" and "Christian", patch by "teor".
2016-03-15Fix whitespace.Nick Mathewson
2016-03-11moving hid_serv_get_responsible_directories and hid_serv_acting_as_directory ↵Hassan Alsibyani
from routerlist.c to rendcommon.c
2016-02-27Update the copyright year.Nick Mathewson
2016-02-23Merge remote-tracking branch 'teor/bug18348-v2'Nick Mathewson
2016-02-22fix two typos in commentsRoger Dingledine
2016-02-20Downgrade directory preference warning to info levelteor (Tim Wilson-Brown)
2016-01-29Merge branch 'feature17840-v11-squashed' into feature17840-v11-mergedteor (Tim Wilson-Brown)
Conflicts: src/or/directory.c src/test/test_routerlist.c Fix minor conflicts.
2016-01-29Optimise reachability checks when iterating through relay liststeor (Tim Wilson-Brown)
Skip address checks on servers. Skip allowed-only address checks on non-bridge clients with IPv4.
2016-01-29Use fascist firewall and ClientUseIPv4 for bridge clientsteor (Tim Wilson-Brown)
Bridge clients ignore ClientUseIPv6, acting as if it is always 1. This preserves existing behaviour. Make ClientPreferIPv6OR/DirPort auto by default: * Bridge clients prefer IPv6 by default. * Other clients prefer IPv4 by default. This preserves existing behaviour.
2016-01-29Log when IPv4/IPv6 restrictions or preferences weren't metteor (Tim Wilson-Brown)
2016-01-29Choose directory servers by IPv4/IPv6 preferencesteor (Tim Wilson-Brown)
Add unit tests, refactor pick_directory functions.
2016-01-29Choose OR Entry Guards using IPv4/IPv6 preferencesteor (Tim Wilson-Brown)
Update unit tests.
2016-01-13Include square brackets and port number in calcs for max_dl_per_requestFergus Dall
2016-01-13Update the limits in max_dl_per_request for IPv6 address lengthFergus Dall
2015-12-18A router must be a dir cache before it may be HSDirMatthew Finkel
Fixes #15801
2015-12-18{dis,en}abling DirCache is a semantic changeMatthew Finkel
2015-12-18Add unit test for router_pick_directory_server_implMatthew Finkel