aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'arma/bug7029'Nick Mathewson2012-10-14
|\
| * Free some more still-in-use memory at exitRoger Dingledine2012-10-03
| |
* | Merge branch 'bug7011'Nick Mathewson2012-10-10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/or/circuitbuild.c The conflict was trivial, since no line of code actually changed in both branches: There was a fmt_addr() that turned into fmt_addrport() in bug7011, and a "if (!n_conn)" that turned into "if (!n_chan)" in master.
| * | Use fmt_addrport where appropriate.David Fifield2012-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly a conversion from this pattern: log("... %s:%d ...", fmt_and_decorate_addr(&addr), port); to this: log("... %s ...", fmt_addrport(&addr, port)); The output is the same in all cases.
| * | Decorate addresses given to a HTTP CONNECT proxy.David Fifield2012-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affects the Request-URI and the value of the Host header. RFC 2616 doesn't directly address the formatting of IPv6 addresses, but it delegates some productions to RFC 2396 "Uniform Resource Identifiers (URI): Generic Syntax," which is obsoleted by RFC 3986, which requires square brackets for IPv6 addresses in both places. I tested this with HTTPSProxy 127.0.0.1:8000 Bridge <IPv6 bridge> UseBridges 1 and an Ncat HTTP proxy: ncat --proxy-type http -l 8000 -vvv https://tools.ietf.org/html/rfc2616#section-3.2.1 https://tools.ietf.org/html/rfc2616#section-5.1.2 https://tools.ietf.org/html/rfc2616#section-14.23 https://tools.ietf.org/html/rfc3986#section-3.2.2
| * | Use fmt_and_decorate_addr in log messages.David Fifield2012-10-10
| |/
* | Convert relay.c/relay.h to channel_tAndrea Shepard2012-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Initial channeltls.c/channeltls.h for bug 6465Andrea Shepard2012-10-08
|/
* Make option OutboundBindAddress accept IPv6 addresses too.Linus Nordberg2012-09-20
| | | | Implements ticket 6786.
* finish backing out 5492de76Roger Dingledine2012-09-09
|
* Fix whitespaceNick Mathewson2012-08-27
|
* Remove needless flush-on-write code.Nick Mathewson2012-08-17
| | | | | | | | | | | | | | | | | 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.
* Updated docs for new connections.Matthew Finkel2012-08-02
|
* Merge remote-tracking branch 'sysrqb/bug6518'Nick Mathewson2012-08-02
|\
| * Constify struct sockaddr *sa parameter for checkMatthew Finkel2012-08-02
| | | | | | | | The values are only being checked, not modified.
* | Removed redundant check_sockaddr_family_match callMatthew Finkel2012-08-02
|/
* Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-07-18
|\
| * Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/ENDNick Mathewson2012-07-17
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'asn/bug3589'Nick Mathewson2012-07-17
|\ \ | |/ |/|
| * Address Nick's comments.George Kadianakis2012-07-12
| | | | | | | | | | | | | | | | - 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.
* | On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rcNick Mathewson2012-07-05
|/
* Merge remote-tracking branch 'andrea/bug6028'Nick Mathewson2012-06-18
|\
| * Always set *socket_error to something appropriate when returning -1 from ↵Andrea Shepard2012-06-15
| | | | | | | | connection_connect()
* | fix the typo on the typo fixRoger Dingledine2012-06-15
| |
* | fix typos from 783f705dRoger Dingledine2012-06-15
| |
* | Document that we are unlikely to underflow session group IDs.Nick Mathewson2012-06-15
| |
* | Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson2012-06-15
|/
* Downgrade tor_assert(0) to tor_fragile_assert() in windows stub ↵Nick Mathewson2012-06-05
| | | | create_unix_sockaddr
* 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.
* Resolve all currently pending DOCDOC items in masterNick Mathewson2012-06-04
|
* Merge remote-tracking branch 'public/bug5374'Nick Mathewson2012-05-31
|\
| * Delay getsockname() call until after connect() is doneNick Mathewson2012-05-24
| | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'bug5604'Nick Mathewson2012-05-30
|\ \
| * | Add a little documentation for the bug5604 fixNick Mathewson2012-05-30
| | |
| * | If DisableNetwork, don't even try to open non-controller listenersNick Mathewson2012-04-18
| | | | | | | | | | | | Fix for 5604; bugfix on 0.2.3.9-alpha, which introduced DisableNetwork.
* | | MSVC build issue: it can't tell that tor_assert(0) aborts.Nick Mathewson2012-05-14
| | |
* | | Merge remote-tracking branch 'public/bug5537'Nick Mathewson2012-04-24
|\ \ \ | |/ / |/| |
| * | We allow IPv6 connections, don't use sockaddr_in with getsocknameNick Mathewson2012-03-30
| | | | | | | | | | | | | | | This fixes client_check_address_changed to work better with IPv6 Tor clients, and prevents them from spewing errors. Fix for ticket 5537.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-04-11
|\ \ \ | |/ / |/| / | |/
| * Include a Host: header with any HTTP/1.1 proxy requestNick Mathewson2012-04-10
| | | | | | | | | | Bugfix on 0.2.2.1-alpha, which added the orginal HTTP proxy authentication code. Fix for bug 5593.
* | Fix a bunch of check-spaces complaintsSebastian Hahn2012-03-28
| |
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2012-03-26
|\| | | | | | | | | Conflicts: src/or/control.c
| * Implement 'safe cookie authentication'Robert Ransom2012-02-22
| |
* | Remove misleading function comment (bug 5324)Roger Dingledine2012-03-07
| | | | | | | | | | | | | | | | | | 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.
* | Set IPV6_V6ONLY on listener sockets bound to IPv6 addresses.Nick Mathewson2012-01-31
| | | | | | | | | | | | 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.
* | Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | | | | | | | | | | | | 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; }
* | set SO_REUSEADDR before we bind, not afterRoger Dingledine2012-01-23
| | | | | | | | resolves bug 4950 (fixes a bug on commit aba7bb705a6 from #2850)
* | 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;
* | Use SOCKET_OK macros in even more placesNick Mathewson2012-01-17
| | | | | | | | | | | | Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET. Partial work for bug4533.