summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
AgeCommit message (Collapse)Author
2017-05-10resolve now-unused parameter from #21642 fixRoger Dingledine
2017-05-10Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-03-06Stop declining to download microdescs with future published times.Nick Mathewson
This change is the only one necessary to allow future versions of the microdescriptor consensus to replace every 'published' date with e.g. 2038-01-01 00:00:00; this will save 50-75% in compressed microdescriptor diff size, which is quite significant. This commit is a minimal change for 0.2.9; future series will reduce the use of the 'published' date even more. Implements part of ticket 21642; implements part of proposal 275.
2017-01-30Fix a pair of compilation errors.Nick Mathewson
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Add a wrapper for a common networkstatus param patternNick Mathewson
We frequently want to check a networkstatus parameter only when it isn't overridden from the torrc file.
2016-12-12Merge remote-tracking branch 'rubiate/ticket20511'Nick Mathewson
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-30Remove an unneccessary FetchUselessDescriptors check in client_would_use_routerteor
2016-11-30Fetch unknown certificates if FetchUselessDescriptors is trueteor
2016-11-30Stop discarding consensus flavors and descriptors we wanted to fetchteor
Instead, fetch and store consensus flavors and descriptors we wanted to fetch. And serve them if we are a directory cache (or authority).
2016-11-10Do not serve a consensus if it is too oldrubiate
Closes ticket 20511.
2016-11-07Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-07Merge branch '20499_part1_029_squashed', remote-tracking branches ↵Nick Mathewson
'teor/bug20591_029' and 'teor/bug20533_029' into maint-0.2.9
2016-11-08When downloading certificates, check for related failuresteor
If a consensus expires while we are waiting for certificates to download, stop waiting for certificates. If we stop waiting for certificates less than a minute after we started downloading them, do not consider the certificate download failure a separate failure. Fixes bug 20533; bugfix on commit e0204f21 in 0.2.0.9-alpha.
2016-11-07Ensure relays don't make multiple connections during bootstrapteor
Relays do not deliberately launch multiple attempts, so the impact of this bug should be minimal. This fix also defends against bugs like #20499. Bugfix on 0.2.8.1-alpha.
2016-11-01Merge branch 'maint-0.2.9'Nick Mathewson
2016-10-31Rename routerstatus_version_supports_ntor to *_supports_extend2_cellsteor
This helps avoid the confusion that caused bug 20472. Bugfix on commit 10aa913 from #19163 in tor-0.2.9.3-alpha.
2016-10-26More module-level documentation.Nick Mathewson
2016-10-14Merge branch 'bug20176_v2'Nick Mathewson
2016-09-26Merge branch 'protover_v2_squashed'Nick Mathewson
2016-09-26Remove version_known, and subtly change the meaning of protocols_knownNick Mathewson
2016-09-26prop264: sometimes check client _and_ server versions.Nick Mathewson
As before, we check server protocols whenever server_mode(options) is true and we check client protocols whenever server_mode(options) is false. Additionally, we now _also_ check client protocols whenever any client port is set.
2016-09-26Include protocol versions in votes.Nick Mathewson
2016-09-26Actually check for missing protocols and exit as appropriate.Nick Mathewson
2016-09-26Add necessary code to parse and handle required/recommended protocolsNick Mathewson
2016-09-21Simplify a few functions that dont need to call get_latest_consensus() so muchNick Mathewson
2016-09-21fix wide linesNick Mathewson
2016-09-21Remove current_consensus macro.Nick Mathewson
It's a macro that calls down to a function whose behavior has been getting progresively more complicated.... but we named it as if it were a variable. That's not so smart. So, replace it with a function call to a function that was just doing "return current_consensus". Fixes bug 20176.
2016-09-20Merge branch 'maint-0.2.8'Nick Mathewson
2016-09-20Don't look at any routerstatus_t when the networkstatus is inconsistentNick Mathewson
For a brief moment in networkstatus_set_current_consensus(), the old consensus has been freed, but the node_t objects still have dead pointers to the routerstatus_t objects within it. During that interval, we absolutely must not do anything that would cause Tor to look at those dangling pointers. Unfortunately, calling the (badly labeled!) current_consensus macro or anything else that calls into we_use_microdescriptors_for_circuits(), can make us look at the nodelist. The fix is to make sure we identify the main consensus flavor _outside_ the danger zone, and to make the danger zone much much smaller. Fixes bug 20103. This bug has been implicitly present for AGES; we just got lucky for a very long time. It became a crash bug in 0.2.8.2-alpha when we merged 35bbf2e4a4e8ccb to make find_dl_schedule start looking at the consensus, and 4460feaf2850ef0 which made node_get_all_orports less (accidentally) tolerant of nodes with a valid ri pointer but dangling rs pointer.
2016-08-29Merge remote-tracking branch 'teor/reject-tap-v6'Nick Mathewson
2016-08-10Debug logging for router/consensus descriptor download resetsAndrea Shepard
2016-07-15Clients avoid choosing nodes that can't do ntorteor (Tim Wilson-Brown)
If we know a node's version, and it can't do ntor, consider it not running. If we have a node's descriptor, and it doesn't have a valid ntor key, consider it not running. Refactor these checks so they're consistent between authorities and clients.
2016-07-15Clients no longer download descriptors for relays without ntorteor (Tim Wilson-Brown)
2016-07-01Merge remote-tracking branch 'dgoulet/ticket16943_029_05-squashed'Nick Mathewson
Trivial Conflicts: src/or/or.h src/or/routerparse.c
2016-07-01prop250: Add unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-07-01prop250: Put commits and SRVs in votes/consensusDavid Goulet
This commit adds the commit(s) line in the vote as well as the SR values. It also has the mechanism to add the majority SRVs in the consensus. Signed-off-by: George Kadianakis <desnacked@riseup.net> Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-30Fix three -Wtautological-constant-out-of-range-compare warnings.Nick Mathewson
2016-06-29Expose GETINFO download status statics for test suite and make things mockableAndrea Shepard
2016-06-29Add router descriptor download status queries to GETINFOAndrea Shepard
2016-06-27Expose consensus download statuses on the control portAndrea Shepard
2016-06-23Merge remote-tracking branch 'public/bug15942_v2_alternative'Nick Mathewson
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-18Use exponential backoffs for consensus downloadsAndrea Shepard
2016-06-18Implement DL_SCHED_RANDOM_EXPONENTIAL support for download_status_tAndrea Shepard
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Describe what happens when we get a consensus, but no certificatesteor (Tim Wilson-Brown)
Comment-only change
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson