aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2014-08-13Merge remote-tracking branch 'public/bug12848_024' into maint-0.2.5Nick Mathewson
Conflicts: src/or/circuitbuild.c
2014-08-12Fix another case of 12848 in circuit_handle_first_hopNick Mathewson
I looked for other places where we set circ->n_chan early, and found one in circuit_handle_first_hop() right before it calls circuit_send_next_onion_skin(). If onion_skin_create() fails there, then n_chan will still be set when circuit_send_next_onion_skin() returns. We should probably fix that too.
2014-08-12Don't send DESTROY to circID 0 when circuit_deliver_create_cell failsNick Mathewson
Cypherpunks found this and wrote this patch. Fix for 12848; fix on (I think) d58d4c0d, which went into 0.0.8pre1
2014-07-25Implement proposal 221: Stop sending CREATE_FASTNick Mathewson
This makes FastFirstHopPK an AUTOBOOL; makes the default "auto"; and makes the behavior of "auto" be "look at the consensus."
2014-07-16diagnostic for 12184: Add a call to channel_dump_statisticsNick Mathewson
2014-06-14Try to diagnose bug 12184Nick Mathewson
Check for consistency between the queued destroy cells and the marked circuit IDs. Check for consistency in the count of queued destroy cells in several ways. Check to see whether any of the marked circuit IDs have somehow been marked longer than the channel has existed.
2014-05-07Basic tests for get_unique_circ_id_by_chan.Nick Mathewson
2014-04-25Merge branch 'scanbuild_fixes'Nick Mathewson
2014-04-24whitespace fixNick Mathewson
2014-04-23Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson
Conflicts: src/or/circuitbuild.c
2014-04-23Improvements to #11553 fix based on reviewNick Mathewson
Use a per-channel ratelim_t to control the rate at which we report failures for each channel. Explain why I picked N=32. Never return a zero circID. Thanks to Andrea and to cypherpunks.
2014-04-18scan-build: circuit_cpath_support_ntor had a dead initializationNick Mathewson
We were initializing cpath twice, which doesn't make sense.
2014-04-18Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson
2014-04-18Add a rate-limiter for the other circuitID exhaustion warningNick Mathewson
2014-04-18Diagnostic warning to see if it's pending destroys causing 11553Nick Mathewson
2014-04-18Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson
Conflicts: src/or/channel.h
2014-04-18Switch to random allocation on circuitIDs.Nick Mathewson
Fixes a possible root cause of 11553 by only making 64 attempts at most to pick a circuitID. Previously, we would test every possible circuit ID until we found one or ran out. This algorithm succeeds probabilistically. As the comment says: This potentially causes us to give up early if our circuit ID space is nearly full. If we have N circuit IDs in use, then we will reject a new circuit with probability (N / max_range) ^ MAX_CIRCID_ATTEMPTS. This means that in practice, a few percent of our circuit ID capacity will go unused. The alternative here, though, is to do a linear search over the whole circuit ID space every time we extend a circuit, which is not so great either. This makes new vs old clients distinguishable, so we should try to batch it with other patches that do that, like 11438.
2014-04-18Supply better and less frequent warnings on circID exhaustionNick Mathewson
Fixes the surface behavior of #11553
2014-03-05Merge remote-tracking branch 'arma/ticket5528'Nick Mathewson
Conflicts: src/or/router.c src/test/test_dir.c
2014-02-07Merge remote-tracking branch 'public/feature9777_024_squashed'Nick Mathewson
Conflicts: src/or/circuitbuild.c
2014-02-07Discard circuit paths on which nobody supports ntorNick Mathewson
Right now this accounts for about 1% of circuits over all, but if you pick a guard that's running 0.2.3, it will be about 6% of the circuits running through that guard. Making sure that every circuit has at least one ntor link means that we're getting plausibly good forward secrecy on every circuit. This implements ticket 9777,
2013-11-01Merge branch 'prop221_squashed_024'Nick Mathewson
Conflicts: src/or/or.h
2013-11-01Implement proposal 221: Stop sending CREATE_FASTNick Mathewson
This makes FastFirstHopPK an AUTOBOOL; makes the default "auto"; and makes the behavior of "auto" be "look at the consensus."
2013-10-31Make circpathbias and circuitbuild compile.Nick Mathewson
That was the tricky part
2013-10-31Move pathbias functions into a new file.Nick Mathewson
Does not compile yet. This is the "no code changed" diff.
2013-10-08Simply route length generation code.Nick Mathewson
The old code had logic to use a shorter path length if we didn't have enough nodes. But we don't support 2-node networks anwyay. Fix for #9926. I'm not calling this a bugfix on any particular version, since a 2-node network would fail to work for you for a lot of other reasons too, and it's not clear to me when that began, or if 2-node networks would ever have worked.
2013-08-22Separate mutable/const accessors for circuit_build_timesNick Mathewson
(These have proved invaluable for other global accessors.)
2013-08-22Rename get_circuit_nbuild_* to end with _msNick Mathewson
2013-08-22Make circ_times static and add accessor functions.vagrant
Change the global circ_times to a static variable and use accessor functions throughout the code, instead of accessing it directly.
2013-08-15Rename circuit_get_global_list to remove trailing _Nick Mathewson
2013-06-20Fix #9108 - make global_circuitlist a doubly linked listMarek Majkowski
2013-06-20Don't access global_circuitlist variable directly. Use a getter instead.Marek Majkowski
2013-04-24Bug 8235: Fix scaling adjustments.Mike Perry
We need to subtract both the current built circuits *and* the attempted circuits from the attempt count during scaling, since *both* have already been counted there.
2013-04-03Fix a wide lineNick Mathewson
2013-04-03Add additional checks for Path Bias scaling.Mike Perry
Just in case more issues remain with scaling, it would be nice to pin-point them as such.
2013-03-29Bug #8196: Demote a path bias notice that can be caused by controllers.Mike Perry
We didn't see this in normal usage anyway.
2013-03-29Bug 8230: Mark circuits as opened before reachability testing.Mike Perry
Should silence two path bias Bug messages seen on relays at startup.
2013-03-27Add some missing case values to please clangNick Mathewson
It seems that some versions of clang that would prefer the -Wswitch-enum compiler flag to warn about switch statements with missing enum values, even if those switch statements have a default. Fixes bug 8598; bugfix on 0.2.4.10-alpha.
2013-03-26Bug 7065: Use $ for idhex instead of =Mike Perry
2013-03-18Merge remote-tracking branch 'public/bug6174' into maint-0.2.4Nick Mathewson
2013-03-18Merge remote-tracking branch 'public/no_dup_guards' into maint-0.2.4Nick Mathewson
2013-03-10Fix 8447: use %u to format circid_t.Nick Mathewson
Now that circid_t is 4 bytes long, the default integer promotions will leave it alone when sizeof(int) == 4, which will leave us formatting an unsigned as an int. That's technically undefined behavior. Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e. Bug not in any released Tor.
2013-02-19Rename circuit_expire_all_dirty_circsNick Mathewson
The new name is circuit_mark_all_dirty_circs_as_unusable. This resolves an XXX024
2013-02-19Downgrade an assert to LD_BUGNick Mathewson
This should prevent crashes on further recurrence of 8065, and help diagnose such if they occur
2013-02-15Merge remote-tracking branch 'public/wide_circ_ids'Nick Mathewson
Conflicts: src/or/channel.h src/or/connection_or.c src/or/cpuworker.c
2013-02-15Merge remote-tracking branch 'public/feature4994-rebased'Nick Mathewson
2013-02-14Be more robust when excluding existing nodes as new dirguardsNick Mathewson
In addition to rejecting them post-hoc, avoid picking them in the first place. This makes us less likely to decide that we can't add guards at all.
2013-02-12Restore the entry/dirguard distinction.Nick Mathewson
We shouldn't be calling choose_random_entry() for directory conncetions; that's what choose_random_dirguard() is for.
2013-02-11Avoid null-pointer deref in pathbias_is_new_circ_attemptNick Mathewson
Coverity is worried about this (CID 980653). It hasn't happened in testing, but we might as well make sure it can't happen.
2013-02-09use router->addr for log messages and controller eventsRoger Dingledine
(rather than router->address)