aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
AgeCommit message (Collapse)Author
2012-10-08Convert relay.c/relay.h to channel_tAndrea Shepard
Note: this is a squashed commit; see branch bug6465_rebased_v2 of user/andrea/tor.git for full history of the following 10 commits: Convert relay.c/relay.h to channel_t Updating the timestamp if n_flushed > 0 at the end of channel_flush_from_first_active_circuit() was redundant since channel_write_cell() et al. do it themselves. Get rid of now-unnecessary time parameter in channel_flush_from_first_active_circuit() Get rid of now-unnecessary time parameter in channel_flush_from_first_active_circuit() in connection_or.c Add non-inlined external call for channeltls.c to free a packed_cell_t Appease make check-spaces in relay.c Replace channel_get_write_queue_len() with sufficient and easier to implement channel_has_queued_writes() in relay.c Rename channel_touched_by_client() and client_used field for consistency with other timestamps in relay.c Don't double-free packed cells in relay.c (channel_t Tor now bootstraps and works as a client) Rearrange channel_t struct to use a union distinguishing listener from cell-bearing channels in relay.c
2012-10-08Initial channeltls.c/channeltls.h for bug 6465Andrea Shepard
2012-09-20Make option OutboundBindAddress accept IPv6 addresses too.Linus Nordberg
Implements ticket 6786.
2012-09-09finish backing out 5492de76Roger Dingledine
2012-08-27Fix whitespaceNick Mathewson
2012-08-17Remove needless flush-on-write code.Nick Mathewson
Long ago, before we had cell queues, it was necessary to maybe call connection_handle_write() from connectino_write_to_buf_impl() on OR connections, so that we wouldn't get into a loop of reading infinite amounts of data and queueing it all on an outbuf before bothering to write any data. If that doesn't sounds like what our code does now, you're right: right now, we won't stick more than OR_CONN_HIGHWATER bytes of cells on an outbuf, and we won't suck more than CELL_QUEUE_HIGHWATER_SIZE cells off any edge connection. So, there's no more call for that code. Removing this code will simplify our data flow, and that should be something we can all get behind.
2012-08-02Updated docs for new connections.Matthew Finkel
2012-08-02Merge remote-tracking branch 'sysrqb/bug6518'Nick Mathewson
2012-08-02Constify struct sockaddr *sa parameter for checkMatthew Finkel
The values are only being checked, not modified.
2012-08-02Removed redundant check_sockaddr_family_match callMatthew Finkel
2012-07-18Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2012-07-17Merge remote-tracking branch 'asn/bug3589'Nick Mathewson
2012-07-17Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/ENDNick Mathewson
The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when you have a nice short loop body, but using it for long bodies makes your preprocessor tell the compiler that all the code is on the same line. That causes grief, since compiler warnings and debugger lines will all refer to that one line. So, here's a new style rule: SMARTLIST_FOREACH blocks need to be short.
2012-07-12Address Nick's comments.George Kadianakis
- Add a changes/ file. - Make it compile under --enable-gcc-warnings. - Update the file-level documentation of src/or/transports.c. - Only update descriptor if at least a managed proxy was configured. - Add our external IP address to the extra-info descriptor instead of 0.0.0.0.
2012-07-05On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rcNick Mathewson
2012-06-18Merge remote-tracking branch 'andrea/bug6028'Nick Mathewson
2012-06-15fix the typo on the typo fixRoger Dingledine
2012-06-15Always set *socket_error to something appropriate when returning -1 from ↵Andrea Shepard
connection_connect()
2012-06-15fix typos from 783f705dRoger Dingledine
2012-06-15Document that we are unlikely to underflow session group IDs.Nick Mathewson
2012-06-15Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson
2012-06-05Downgrade tor_assert(0) to tor_fragile_assert() in windows stub ↵Nick Mathewson
create_unix_sockaddr
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2012-06-04Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson
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.
2012-06-04Resolve all currently pending DOCDOC items in masterNick Mathewson
2012-05-31Merge remote-tracking branch 'public/bug5374'Nick Mathewson
2012-05-30Merge branch 'bug5604'Nick Mathewson
2012-05-30Add a little documentation for the bug5604 fixNick Mathewson
2012-05-24Delay getsockname() call until after connect() is doneNick Mathewson
On Windows, getsockname() on a nonblocking apparently won't work until the connection is done connecting. On XP, it seems to fail by reporting success and declaring that your address is INADDR_ANY. On the Win8 preview, though, it fails more loudly and says WSAEINVAL. Fix for bug 5374; bugfix on 0.1.1.14-alpha.
2012-05-14MSVC build issue: it can't tell that tor_assert(0) aborts.Nick Mathewson
2012-04-24Merge remote-tracking branch 'public/bug5537'Nick Mathewson
2012-04-18If DisableNetwork, don't even try to open non-controller listenersNick Mathewson
Fix for 5604; bugfix on 0.2.3.9-alpha, which introduced DisableNetwork.
2012-04-11Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-04-10Include a Host: header with any HTTP/1.1 proxy requestNick Mathewson
Bugfix on 0.2.2.1-alpha, which added the orginal HTTP proxy authentication code. Fix for bug 5593.
2012-03-30We allow IPv6 connections, don't use sockaddr_in with getsocknameNick Mathewson
This fixes client_check_address_changed to work better with IPv6 Tor clients, and prevents them from spewing errors. Fix for ticket 5537.
2012-03-28Fix a bunch of check-spaces complaintsSebastian Hahn
2012-03-26Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/control.c
2012-03-07Remove misleading function comment (bug 5324)Roger Dingledine
In the distant past, connection_handle_read() could be called when there are pending bytes in the TLS object during the main loop. The design since then has been to always read all pending bytes immediately, so read events only trigger when the socket actually has bytes to read. Resolves bug 5324.
2012-02-22Implement 'safe cookie authentication'Robert Ransom
2012-01-31Set IPV6_V6ONLY on listener sockets bound to IPv6 addresses.Nick Mathewson
If we don't do this, [::] can be interpreted to mean all v4 and all v6 addresses. Found by dcf. Fixes bug 4760. See RFC 3493 section 5.3 for more info.
2012-01-31Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
2012-01-23set SO_REUSEADDR before we bind, not afterRoger Dingledine
resolves bug 4950 (fixes a bug on commit aba7bb705a6 from #2850)
2012-01-18Rename nonconformant identifiers.Nick Mathewson
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;
2012-01-17Use SOCKET_OK macros in even more placesNick Mathewson
Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET. Partial work for bug4533.
2012-01-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-12-30Fix a check-spaces violation in compat.cSebastian Hahn
Also fix a comment typo
2011-12-30Fix spelling in a controlsocket log msgSebastian Hahn
Fixes bug 4803.
2011-12-22Merge remote-tracking branch 'public/bug4697'Nick Mathewson
2011-12-21Convert a couple of char[256]s into sockaddr_storageNick Mathewson
2011-12-21Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson