summaryrefslogtreecommitdiff
path: root/src/or/connection.c
AgeCommit message (Collapse)Author
2017-12-11Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-12-11Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-12-11Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-12-11Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-11-16Fix a traceback when closing a blocked connection "immediately".Nick Mathewson
When we close a connection via connection_close_immediately, we kill its events immediately. But if it had been blocked on bandwidth read/write, we could try to re-add its (nonexistent) events later from connection_bucket_refill -- if we got to that callback before we swept the marked connections. Fixes bug 24167. Fortunately, this hasn't been a crash bug since we introduced connection_check_event in 0.2.9.10, and backported it. This is a bugfix on commit 89d422914a0c3cb, I believe, which appeared in Tor 0.1.0.1-rc.
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