summaryrefslogtreecommitdiff
path: root/src/or/connection.c
AgeCommit message (Collapse)Author
2018-02-07Remove anything related to the old SocksSockets optionDavid Goulet
At this commit, the SocksSocketsGroupWritable option is renamed to UnixSocksGroupWritable. A deprecated warning is triggered if the old option is used and tor will use it properly. Fixes #24343 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-01-30Merge branch 'ticket24902_029_05' into ticket24902_033_02David Goulet
2018-01-30dos: Add the connection DoS mitigation subsystemDavid Goulet
Defend against an address that has reached the concurrent connection count threshold. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-30dos: Track new and closed OR client connectionsDavid Goulet
Implement a basic connection tracking that counts the number of concurrent connections when they open and close. This commit also adds the circuit creation mitigation data structure that will be needed at later commit to keep track of the circuit rate. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-17Merge branch 'bug22798_029_squashed'Nick Mathewson
2018-01-17update comment; ignore argument on non-winNick Mathewson
2018-01-17Improve Windows performance with SIO_IDEAL_SEND_BACKLOG_QUERY.Nick Mathewson
Patch written by "Vort" on trac. Addresses ticket 22798.
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-12-08Convert connection_free to a nulling macro.Nick Mathewson
2017-12-08Rename connection_free_ to connection_free_minimal.Nick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Merge branch 'bug24167_025' into maint-0.3.2Nick 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-11-09Merge branch 'ticket12062_squashed'Nick Mathewson
2017-11-09Audit all of the "is the network turned off" checks.Nick Mathewson
DisableNetwork is a subset of net_is_disabled(), which is (now) a subset of should_delay_dir_fetches(). Some of these changes are redundant with others higher or lower in the call stack. The ones that I think are behavior-relevant are listed in the changes file. I've also added comments in a few places where the behavior is subtle. Fixes bug 12062; bugfix on various versions.
2017-11-02Merge branch 'buf_for_stringbuffer_squashed'Nick Mathewson
2017-11-02Refactor connection_write_to_buf_impl_(); add one that takes a buf_tNick Mathewson
2017-10-18Expose connection_init_accepted_conn.Nick Mathewson
2017-09-19Merge remote-tracking branch 'teor/minor-comments'Nick Mathewson
2017-09-19Improve comments formatting in connection.cteor
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-14Make trusted clock skew a bootstrap warningTaylor Yu
Make clock skew events based on trusted sources produce a bootstrap warning so controllers can more easily alert users about clock skew problems.
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
2017-09-08Merge remote-tracking branch 'dgoulet/ticket23355_032_01'Nick Mathewson
2017-09-05Merge branch 'http_tunnel_squashed'Nick Mathewson
2017-09-05Add support for HTTP Connect tunnelsNick Mathewson
2017-09-05Refactor buffer APIs to put a buf_t first.Nick Mathewson
By convention, a function that frobs a foo_t should be called foo_frob, and it should have a foo_t * as its first argument. But for many of the buf_t functions, the buf_t was the final argument, which is silly.
2017-09-05Repair wide lines from previous commit.Nick Mathewson
2017-09-05Repair buffer API so everything starts with buf_.Nick Mathewson
Our convention is that functions which manipulate a type T should be named T_foo. But the buffer functions were super old, and followed all kinds of conventions. Now they're uniform. Here's the perl I used to do this: \#!/usr/bin/perl -w -i -p s/read_to_buf\(/buf_read_from_socket\(/; s/flush_buf\(/buf_flush_to_socket\(/; s/read_to_buf_tls\(/buf_read_from_tls\(/; s/flush_buf_tls\(/buf_flush_to_tls\(/; s/write_to_buf\(/buf_add\(/; s/write_to_buf_compress\(/buf_add_compress\(/; s/move_buf_to_buf\(/buf_move_to_buf\(/; s/peek_from_buf\(/buf_peek\(/; s/fetch_from_buf\(/buf_get_bytes\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/buf_remove_from_front\(/buf_drain\(/; s/peek_buf_startswith\(/buf_peek_startswith\(/; s/assert_buf_ok\(/buf_assert_ok\(/;
2017-09-05Move the tls parts of buffers.c into buffers_tls.cNick Mathewson
2017-09-05Move protocol-specific functions out of buffers.cNick Mathewson
This commit does not change the implementation of any function: it only moves code and adds new includes as necessary. Part of #23149.
2017-08-30prop224: Purge client state on NEWNYMDavid Goulet
Closes #23355 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24conn: Add a function to return a list of connection by stateDavid Goulet
This will be useful to the hidden service subsystem that needs to go over all connections of a certain state to attach them to a hidden service circuit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07prop224: Add connection and circuit identifier objectDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
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.