aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
AgeCommit message (Collapse)Author
2016-10-17Write a bunch of module documentation.Nick Mathewson
This commit adds or improves the module-level documenation for: buffers.c circuitstats.c command.c connection_edge.c control.c cpuworker.c crypto_curve25519.c crypto_curve25519.h crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c protover.c protover.h reasons.c rephist.c replaycache.c routerlist.c routerparse.c routerset.c statefile.c status.c tor_main.c workqueue.c In particular, I've tried to explain (for each documented module) what each module does, what's in it, what the big idea is, why it belongs in Tor, and who calls it. In a few cases, I've added TODO notes about refactoring opportunities. I've also renamed an argument, and fixed a few DOCDOC comments.
2016-08-24Client & HS make sure every hop in every non-HS path supports ntorteor (Tim Wilson-Brown)
When a client connects to an intro point not in the client's consensus, or a hidden service connects to a rend point not in the hidden service's consensus, we are stuck with using TAP, because there is no ntor link specifier.
2016-07-06Improve test coverage a little on onion*.cNick Mathewson
2016-06-12Keep make check-spaces happyAndrea Shepard
2016-06-11Merge branch 'bug19180_easy_squashed'Nick Mathewson
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
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-03-29fix typo in commentRoger Dingledine
2016-02-27Update the copyright year.Nick Mathewson
2015-02-02Merge remote-tracking branch 'public/bug9635_warnings_025'Nick Mathewson
Conflicts: src/test/test.c
2015-01-14Refactor cpuworker to use workqueue/threadpool code.Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-10-27Remove configure option to disable curve25519Sebastian Hahn
By now, support in the network is widespread and it's time to require more modern crypto on all Tor instances, whether they're clients or servers. By doing this early in 0.2.6, we can be sure that at some point all clients will have reasonable support.
2014-10-16Downgrade 'invalid result from curve25519 handshake: 4' warningNick Mathewson
Also, refactor the way we handle failed handshakes so that this warning doesn't propagate itself to "onion_skin_client_handshake failed" and "circuit_finish_handshake failed" and "connection_edge_process_relay_cell (at origin) failed." Resolves warning from 9635.
2014-05-01Merge remote-tracking branch 'public/bug9635'Nick Mathewson
2014-04-18scan-build: Have clear_pending_onions walk the lists more obviouslyNick Mathewson
As it stands, it relies on the fact that onion_queue_entry_remove will magically remove each onionskin from the right list. This patch changes the logic to be more resilient to possible bugs in onion_queue_entry_remove, and less confusing to static analysis tools.
2014-03-27Give specific warnings when client-side onionskin handshakes failNick Mathewson
Fix for bug9635.
2014-01-03Add explicit check for 0-length extend2 cellsNick Mathewson
This is harmless in the Tor of today, but important for correctness. Fixes bug 10536; bugfix on 0.2.4.8-alpha. Reported by "cypherpunks".
2013-09-05Merge branch 'maint-0.2.4'Roger Dingledine
2013-09-05Revert e443beff and solve it a different wayRoger Dingledine
Now we explicitly check for overflow. This approach seemed smarter than a cascade of "change int to unsigned int and hope nothing breaks right before the release". Nick, feel free to fix in a better way, maybe in master.
2013-09-05don't let recently_chosen_ntors overflowRoger Dingledine
with commit c6f1668d we let it grow arbitrarily large. it can still overflow, but the damage is very small now.
2013-09-04Merge branch 'maint-0.2.4'Roger Dingledine
Conflicts: src/test/test.c
2013-09-04nickm wants us to prioritize tap in a currently-rare edge caseRoger Dingledine
2013-09-04Be more general in calculating expected onion queue processing timeRoger Dingledine
Now we consider the TAP cells we'll process while draining the NTor queue, and vice versa.
2013-09-04let the NumNTorsPerTAP consensus param override our queue choiceRoger Dingledine
2013-09-04do a lopsided round-robin between the onion queuesRoger Dingledine
that way tap won't starve entirely, but we'll still handle ntor requests quicker.
2013-09-04check bounds on handshake_type more thoroughlyRoger Dingledine
2013-09-04add info-level logs to help track onion queue sizesRoger Dingledine
2013-09-04refactor and give it unit testsRoger Dingledine
2013-09-04Separate cpuworker queues by handshake typeRoger Dingledine
Now we prioritize ntor create cells over tap create cells. Starts to address ticket 9574.
2013-08-23fix typosRoger Dingledine
2013-06-20Fix #9108 - make global_circuitlist a doubly linked listMarek Majkowski
2013-02-04Fix a warning when building with --disable-curve25519Nick Mathewson
It appears that the code for 7291 gave an unused-value warning when built with --disable-curve25519.
2013-01-30Rename all of the macros in tor_queue.h to start with TOR_Nick Mathewson
2013-01-24Merge branch 'time_based_onionqueue_v2' of ssh://git-rw.torproject.org/nickm/torAndrea Shepard
2013-01-16Update the copyright date to 201.Nick Mathewson
2013-01-15Clean up odds and endsRoger Dingledine
2013-01-15Fix handling of ntor handshakes received via CREATE cellsNick Mathewson
Fixes bug 7959; bugfix on 0.2.4.8-alpha.
2013-01-03Use a TAILQ, not a singly-linked queue, for the onion queue.Nick Mathewson
This makes removing items from the middle of the queue into an O(1) operation, which could prove important as we let onionqueues grow longer. Doing this actually makes the code slightly smaller, too.
2013-01-03Eliminate MaxOnionsPending; replace it with MaxOnionQueueDelayNick Mathewson
The right way to set "MaxOnionsPending" was to adjust it until the processing delay was appropriate. So instead, let's measure how long it takes to process onionskins (sampling them once we have a big number), and then limit the queue based on its expected time to finish. This change is extra-necessary for ntor, since there is no longer a reasonable way to set MaxOnionsPending without knowing what mix of onionskins you'll get. This patch also reserves 1/3 of the onionskin spots for ntor handshakes, on the theory that TAP handshakes shouldn't be allowed to starve their speedier cousins. We can change this later if need be. Resolves 7291.
2013-01-03Complete all DOCDOC entries from the ntor branchNick Mathewson
2013-01-03ntor: Don't fail fast server-side on an unrecognized KEYID(B)Nick Mathewson
2013-01-03Fix an unused-variable warningNick Mathewson
2013-01-03Don't check create cells too much when we're relaying themNick Mathewson
We want to sanity-check our own create cells carefully, and other people's loosely.
2013-01-03Implement scheme to allow ntor requests/responses via older serversNick Mathewson
2013-01-03Use created_cell_format where appropriateNick Mathewson
2013-01-03Teach cpuworker and others about create_cell_t and friendsNick Mathewson
The unit of work sent to a cpuworker is now a create_cell_t; its response is now a created_cell_t. Several of the things that call or get called by this chain of logic now take create_cell_t or created_cell_t too. Since all cpuworkers are forked or spawned by Tor, they don't need a stable wire protocol, so we can just send structs. This saves us some insanity, and helps p
2013-01-03Code to parse and format CREATE{,2,_FAST} cells and their alliesNick Mathewson
As elsewhere, it makes sense when adding or extending a cell type to actually make the code to parse it into a separate tested function. This commit doesn't actually make anything use these new functions; that's for a later commit.
2013-01-03Massive refactoring of the various handshake typesNick Mathewson
The three handshake types are now accessed from a unified interface; their state is abstracted from the rest of the cpath state, and so on.