aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
Commit message (Collapse)AuthorAge
* Resolve about 24 DOCDOCsNick Mathewson2012-06-05
|
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson2012-06-04
| | | | | | | | Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together.
* Merge remote-tracking branch 'public/bug5541_v2'Nick Mathewson2012-05-31
|\
| * Prevent an (impossible) null-pointer dereference in ↵Nick Mathewson2012-05-15
| | | | | | | | | | | | | | | | | | | | | | connection_edge_process_relay_cell This would happen if the deliver window could become negative because of an nonexistent connection. (Fortunately, _that_ can't occur, thanks to circuit_consider_sending_sendme. Still, if we change our windowing logic at all, we won't want this to become triggerable.) Fix for bug 5541. Bugfix on 4a66865d, back from 0.0.2pre14. asn found this. Nice catch, asn!
* | Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-12-28
|\|
| * Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-12-28
| |\
| | * Bug 4786 fix: don't convert EARLY to RELAY on v1 connectionsNick Mathewson2011-12-28
| | | | | | | | | | | | | | | | | | We used to do this as a workaround for older Tors, but now it's never the correct thing to do (especially since anything that didn't understand RELAY_EARLY is now deprecated hard).
* | | Downgrade relay_early-related warningNick Mathewson2011-12-26
| | |
* | | Allow prop110 violations if AllowNonearlyExtend is set in consensusNick Mathewson2011-12-22
| | |
* | | Log what fraction of EXTEND cells have died for being non-earlyNick Mathewson2011-12-22
| | |
* | | Implement the last of proposal 110Nick Mathewson2011-12-22
| | | | | | | | | | | | Reject all EXTEND requests not received in a relay_early cell
* | | Add an assert before dereferencing entry_conn->socks_requestRobert Ransom2011-11-29
| | | | | | | | | | | | This may turn a segfault which katmagic saw into an assertion failure.
* | | All-in-one benchmark test for cell cryptoNick Mathewson2011-11-11
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-09-09
|\| | | | | | | | | | | | | | | | | Conflicts: configure.in src/or/circuitbuild.c
| * | Use %f with printf-style formatting, not %lfNick Mathewson2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For printf, %f and %lf are synonymous, since floats are promoted to doubles when passed as varargs. It's only for scanf that we need to say "%lf" for doubles and "%f" for floats. Apparenly, some older compilers think it's naughty to say %lf and like to spew warnings about it. Found by grarpamp.
* | | Fix whitespace issues in patches merged today so farNick Mathewson2011-09-07
| | |
* | | Move entry-only fields from edge_connection_t to entry_connection_tNick Mathewson2011-07-21
| | | | | | | | | | | | Also, refactor the code accordingly.
* | | Remember optimistically sent data until we have gotten a CONNECTEDNick Mathewson2011-07-18
| | | | | | | | | | | | | | | Since we can retry failed streams under some circumstances, we need to be ready to send data queued on them.
* | | Don't shadow parameters with local variablesNick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | This is a little error-prone when the local has a different type from the parameter, and is very error-prone with both have the same type. Let's not do this. Fixes CID #437,438,439,440,441.
* | | Make the get_options() return constNick Mathewson2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conflicts were mainly caused by the routerinfo->node transition. Conflicts: src/or/circuitbuild.c src/or/command.c src/or/connection_edge.c src/or/directory.c src/or/dirserv.c src/or/relay.c src/or/rendservice.c src/or/routerlist.c
| * | Log descriptions of nodes, not just nicknames.Nick Mathewson2011-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a few new functions in router.c to produce a more helpful description of a node than its nickame, and then tweaks nearly all log messages taking a nickname as an argument to call these functions instead. There are a few cases where I left the old log messages alone: in these cases, the nickname was that of an authority (whose nicknames are useful and unique), or the message already included an identity and/or an address. I might have missed a couple more too. This is a fix for bug 3045.
* | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023Nick Mathewson2011-05-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c
| * | Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson2011-05-11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug3122_memcmp_022 Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c
| | * Hand-conversion and audit phase of memcmp transitionNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant.
| | * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c
| * | Add XXX023s for our timestamp_dirty abuse.Nick Mathewson2011-03-25
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-03-16
|\| |
| * | Move the decl for tor_gettimofday_cache_clear to the right headerNick Mathewson2011-03-16
| | |
* | | Merge remote branch 'arma/optimistic_server'Nick Mathewson2011-03-15
|\ \ \
| * | | whitespace fixes to pass 'make check-spaces'Roger Dingledine2011-03-15
| | | |
| * | | Revise prop174 patch: make the circuit sendme calls unconditional.Nick Mathewson2011-03-14
| | | | | | | | | | | | | | | | | | | | The circuit_consider_sending_sendme call should be unconditional, since the circuit windows can move independent of the state of streams.
| * | | Implement server side of Proposal 174 (optimistic data)Ian Goldberg2011-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ian's original message: The current code actually correctly handles queued data at the Exit; if there is queued data in a EXIT_CONN_STATE_CONNECTING stream, that data will be immediately sent when the connection succeeds. If the connection fails, the data will be correctly ignored and freed. The problem with the current server code is that the server currently drops DATA cells on streams in the EXIT_CONN_STATE_CONNECTING state. Also, if you try to queue data in the EXIT_CONN_STATE_RESOLVING state, bad things happen because streams in that state don't yet have conn->write_event set, and so some existing sanity checks (any stream with queued data is at least potentially writable) are no longer sound. The solution is to simply not drop received DATA cells while in the EXIT_CONN_STATE_CONNECTING state. Also do not send SENDME cells in this state, so that the OP cannot send more than one window's worth of data to be queued at the Exit. Finally, patch the sanity checks so that streams in the EXIT_CONN_STATE_RESOLVING state that have buffered data can pass. [...] Here is a simple patch. It seems to work with both regular streams and hidden services, but there may be other corner cases I'm not aware of. (Do streams used for directory fetches, hidden services, etc. take a different code path?)
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-03-15
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Fix comment for connection_edge_consider_sending_sendmeNick Mathewson2011-03-15
| | |
* | | Merge branch 'maint-0.2.2'Roger Dingledine2011-01-15
|\| |
| * | Sanity-check consensus param valuesSebastian Hahn2011-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure that the worst thing that a weird consensus param can do to us is to break our Tor (and only if the other Tors are reliably broken in the same way) so that the majority of directory authorities can't pull any attacks that are worse than the DoS that they can trigger by simply shutting down. One of these worse things was the cbtnummodes parameter, which could lead to heap corruption on some systems if the value was sufficiently large. This commit fixes this particular issue and also introduces sanity checking for all consensus parameters.
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\| | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Merge branch 'maint-0.2.2'Roger Dingledine2010-12-19
|\| |
| * | Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson2010-12-15
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
| | * Make payloads into uint8_t.Nick Mathewson2010-12-15
| | | | | | | | | | | | This will avoid some signed/unsigned assignment-related bugs.
| | * Backport END_STREAM_REASON_NOROUTE for client use.Sebastian Hahn2010-08-18
| | | | | | | | | | | | (Partial backport of 150ed553dfce9, 161b275028e90, and 4c948ffd6.)
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-11-30
|\| | | | | | | | | | | | | | Conflicts: src/or/relay.c
| * | Revise comment on 2210 a little; clean up n_streams/num_streams confusionNick Mathewson2010-11-29
| | | | | | | | | | | | Also add a changes file
| * | Add wrappers function for libc random()Nick Mathewson2010-11-29
| | | | | | | | | | | | On windows, it's called something different.