summaryrefslogtreecommitdiff
path: root/src/or/connection.c
AgeCommit message (Collapse)Author
2017-05-30remove obsolete commentRoger Dingledine
we should have taken out this comment with commit aadff6274 during ticket 16480.
2017-04-18Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-18Rename `zlib_state` to `compress_state` in `dir_connection_t`.Alexander Færøy
This patch renames the `zlib_state` field in `dir_connection_t` to `compress_state`. See https://bugs.torproject.org/21663
2017-04-17Refactor the streaming compression code.Alexander Færøy
This patch refactors our streaming compression code to allow us to extend it with non-zlib/non-gzip based compression schemas. See https://bugs.torproject.org/21663
2017-03-28Merge branch 'spooling_squashed'Nick Mathewson
2017-03-28Refactor the directory spool implementationNick Mathewson
The old implementation had duplicated code in a bunch of places, and it interspersed spool-management with resource management. The new implementation should make it easier to add new resource types and maintain the spooling code. Closing ticket 21651.
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-27Bulletproof conn_get_outbound_address() a little.Nick Mathewson
2017-01-27Outbindbindaddress variants for Exit and OR.Nick Mathewson
Allow separation of exit and relay traffic to different source IP addresses (Ticket #17975). Written by Michael Sonntag.
2017-01-08comment fixupsChelsea H. Komlo
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Remove guard_selection argument from status-reporting functionsNick Mathewson
This prevents us from mixing up multiple guard_selections
2016-12-16When freeing a guard state, cancel it if its state is unknownNick Mathewson
We don't want a guard to stay "pending" forever if the circuit_guard_state_t for it is freed before it succeeds or fails.
2016-12-08Merge branch 'feature15056_v1_squashed'Nick Mathewson
2016-12-08Rename connection_or_remove_from_identity_mapNick Mathewson
2016-12-02Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-02Merge branch 'bug20716_026' into maint-0.2.9Nick Mathewson
2016-12-01Fix memory leak in bug 20716overcaffeinated
newconn->address is strdup'ed twice when new_type == CONN_TYPE_AP and conn->socket_family == AF_UNIX. Whilst here, juggle code to make sure newconn->port is assigned from an initialised value in the above case.
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
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-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04hs: Refactor rend_data_t for multi version supportDavid Goulet
In order to implement proposal 224, we need the data structure rend_data_t to be able to accomodate versionning that is the current version of hidden service (2) and the new version (3) and future version. For that, we implement a series of accessors and a downcast function to get the v2 data structure. rend_data_t becomes a top level generic place holder. The entire rend_data_t API has been moved to hs_common.{c|h} in order to seperate code that is shared from between HS versions and unshared code (in rendcommon.c). Closes #19024 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-10-18Document connection_or.c and connection.c at module levelNick Mathewson
2016-08-26Fix OOS comparator fixAndrea Shepard
2016-08-25Fix duplicated if condition in connection.cDavid Goulet
Furthermore, fix a test that could returned an uninitialized value. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-20Use connection_mark_for_close() rather than connection_mark_on_flush() on OOSAndrea Shepard
2016-08-20Add DisableOOSCheck option, on by default until we have better heuristicsAndrea Shepard
2016-08-20Consider the case that a connection doesn't have a valid socket during OOSAndrea Shepard
2016-08-20Add connection_is_moribund() inlineAndrea Shepard
2016-08-20s/connection_handle_oos/connection_check_oos/g per code reviewAndrea Shepard
2016-08-20Unit test for kill_conn_list_for_oos()Andrea Shepard
2016-08-20Unit test for connection_handle_oos()Andrea Shepard
2016-08-20Implement OOS comparatorAndrea Shepard
2016-08-20Implement pick_oos_victims() except for sort stepAndrea Shepard
2016-08-20Implement kill_conn_list_for_oos()Andrea Shepard
2016-08-20Stub out pick_oos_victims() and kill_conn_list_for_oos()Andrea Shepard
2016-08-20Implement connection_count_moribund() for OOS handlerAndrea Shepard
2016-08-20Don't say OOS unless the ConnLimit thresholds have been setAndrea Shepard
2016-08-20Stub out connection_handle_oos() and call it from places we can change the ↵Andrea Shepard
socket count or thresholds
2016-08-02Remove/fix remaining evbuffer referencesNick Mathewson
2016-08-02Search for remaining references to 'bufferevent'.Nick Mathewson
Remove or adjust as appropriate.
2016-08-02Remove generic_buffer_*() functions as needless.Nick Mathewson
These functions were there so that we could abstract the differences between evbuffer and buf_t. But with the bufferevent removal, this no longer serves a purpose.
2016-08-02Bufferevent removal: remove HAS_BUFFEREVENT macros and usageNick Mathewson
This is another way that we had bufferevents-only code marked.
2016-07-14Remove bufferevents dead codeU+039b
Signed-off-by: U+039b <*@0x39b.fr>
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-06-11Enable -Wnull-dereference (GCC >=6.1), and fix the easy casesNick Mathewson
This warning, IIUC, means that the compiler doesn't like it when it sees a NULL check _after_ we've already dereferenced the variable. In such cases, it considers itself free to eliminate the NULL check. There are a couple of tricky cases: One was the case related to the fact that tor_addr_to_in6() can return NULL if it gets a non-AF_INET6 address. The fix was to create a variant which asserts on the address type, and never returns NULL.
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-09remove some more unused codeRoger Dingledine