aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
Commit message (Collapse)AuthorAge
* Merge branch 'quiet_lib_versions_squashed'Nick Mathewson2012-09-06
|\
| * Don't log about Libevent/OpenSSL initialization when all's wellNick Mathewson2012-09-06
| | | | | | | | | | OTOH, log the Libevent and OpenSSL versions on the first line when we're starting Tor.
* | Start passing ports to tor_check_port_forwarding().George Kadianakis2012-09-05
| | | | | | | | | | Conflicts: src/or/transports.c
* | Refactor tor to support the new tor-fw-helper protocol.George Kadianakis2012-09-05
|/ | | | | | | | | | | | Add handle_fw_helper_output(), a function responsible for parsing the output of tor-fw-helper. Refactor tor_check_port_forwarding() and run_scheduled_events() accordingly too. We now issue warnings when we get control output from tor-fw-helper, and we log the verbose output of tor-fw-helper in LOG_INFO. Conflicts: src/common/util.c
* Merge remote-tracking branch 'arma/feature6758'Nick Mathewson2012-09-04
|\
| * omit the first heartbeat message (resolves ticket 6758)Roger Dingledine2012-09-03
| |
* | quiet "I learned some more directory information" on startupRoger Dingledine2012-09-03
|/ | | | | | | Reserve it for when new directory information arrives in response to a fetch. Resolves ticket 6760.
* 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.
* Catch a few more K&R violations with make check-spacesNick Mathewson2012-06-23
| | | | | | | | | | | | | | | | | | | | | We now catch bare {s that should be on the previous line with a do, while, if, or for, and elses that should share a line with their preceding }. That is, if (foo) { and if (foo) { ... } else are now detected. We should think about maybe making Tor uncrustify-clean some day, but configuring uncrustify is an exercise in bizarreness, and reformatting huge gobs of Tor is always painful.
* Disable warning for marked-but-reading in main.cNick Mathewson2012-06-19
| | | | | | | | | | | It turns out this can happen. Even though there is no reason for connections to be marked but reading, we leave them reading anyway, so warning here is unwarranted. Let's turn that back on once we do something sensible and disable reading when we mark. Bugfix for 6203 on Tor 0.2.3.17-beta. Thanks to cypherpunks for pointing out the general stupidity of the original code here.
* Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson2012-06-15
|
* tab-man returneth (this time using the name 'rob')Roger Dingledine2012-06-15
|
* Merge remote-tracking branch 'asn-mytor/bug5589_take2'Nick Mathewson2012-06-14
|\
| * Remove validate_pluggable_transports_config(): redundant since 9d9b5ed0.George Kadianakis2012-06-14
| | | | | | | | | | | | The warning message of validate_pluggable_transports_config() is superseded by the changes in the warning message of connection_or_connect() when the proxy credentials can't be found.
* | Add rate-limited log message to bug5263 fixNick Mathewson2012-06-13
| | | | | | | | | | Initially I said, "I claim that we shouldn't be reading and marked; let's see if I'm right." But Rob finds that it does.
* | Fix busy Libevent loops (infinite loops in Shadow)Rob G. Jansen2012-06-13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug causing busy loops in Libevent and infinite loops in the Shadow simulator. A connection that is marked for close, wants to flush, is held open to flush, but is rate limited (the token bucket is empty) triggers the bug. This commit fixes the bug. Details are below. This currently happens on read and write callbacks when the active socket is marked for close. In this case, Tor doesn't actually try to complete the read or write (it returns from those methods when marked), but instead tries to clear the connection with conn_close_if_marked(). Tor will not close a marked connection that contains data: it must be flushed first. The bug occurs when this flush operation on the marked connection can not occur because the connection is rate-limited (its write token bucket is empty). The fix is to detect when rate limiting is preventing a marked connection from properly flushing. In this case, it should be flagged as read/write_blocked_on_bandwidth and the read/write events de-registered from Libevent. When the token bucket gets refilled, it will check the associated read/write_blocked_on_bandwidth flag, and add the read/write event back to Libevent, which will cause it to fire. This time, it will be properly flushed and closed. The reason that both read and write events are both de-registered when the marked connection can not flush is because both result in the same behavior. Both read/write events on marked connections will never again do any actual reads/writes, and are only useful to trigger the flush and close the connection. By setting the associated read/write_blocked_on_bandwidth flag, we ensure that the event will get added back to Libevent, properly flushed, and closed. Why is this important? Every Shadow event occurs at a discrete time instant. If Tor does not properly deregister Libevent events that fire but result in Tor essentially doing nothing, Libevent will repeatedly fire the event. In Shadow this means infinite loop, outside of Shadow this means wasted CPU cycles.
* 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.
* Merge branch 'bug5604'Nick 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.
* | When ReloadTorrcOnSIGHUP=1, do non-reload activities anywayNick Mathewson2012-05-16
|/ | | | | | | | | | | | | Previously, we skipped everything that got invoked from options_init_from_torrc. But some of the stuff in options_act_reversible and options_act is actually important, like reopening the logs. Now, a SIGHUP always makes the effects of an options_set() happen, even though the options haven't changed. Fix for bug 5095; bugfix on 0.2.1.9-alpha, which introduced __ReloadTorrcOnSIGHUP.
* Fix fencepost error with HearbeatPeriod optionSebastian Hahn2012-02-08
| | | | | We'd only log every HeartbeatPeriod + 1 seconds. Discovered by Scott Bennett, reported as bug 4942.
* 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; }
* 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;
* Fixed build with GCC < 3.3Martin Hebnes Pedersen2011-12-19
| | | | | | Preprocessor directives should not be put inside the arguments of a macro. This is not supported on older GCC releases (< 3.3) thus broke compilation on Haiku (running gcc2).
* paint bug2474's fix a different neon colorRoger Dingledine2011-12-08
| | | | this way people with 80-column logs may read more of the warning
* Only define set_buffer_lengths_to_zero if bufferevents are enabledMurdoch@cl.cam.ac.uk2011-11-30
| | | | Otherwise, on Windows, gcc will warn about the function being unused
* Merge branch 'feature2553-v4-rebased'Nick Mathewson2011-11-30
|\
| * Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous modeRobert Ransom2011-11-30
| |
* | Initial hacking for proposal 186.Nick Mathewson2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
* | Merge remote-tracking branch 'asn-mytor/bug4548_take2'Nick Mathewson2011-11-29
|\ \
| * | Simply initialize TLS context if DynamicDHGroups change.George Kadianakis2011-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to do init_keys() if DynamicDHGroups changed after a HUP, so that the dynamic DH modulus was stored on the disk. Since we are now doing dynamic DH modulus storing in crypto.c, we can simply initialize the TLS context and be good with it. Introduce a new function router_initialize_tls_context() which initializes the TLS context and use it appropriately.
| * | Implement dynamic prime reading and storing to disk.George Kadianakis2011-11-24
| | |
| * | Make DynamicPrimes SIGHUP-able.George Kadianakis2011-11-24
| | | | | | | | | | | | | | | | | | Instead of passing the DynamicPrimes configuration option to crypto_global_init(), generate and set a new TLS DH prime when we read the torrc.
| * | Introduce the DynamicPrimes configuration option.George Kadianakis2011-11-24
| |/
* | New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson2011-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
* | Merge remote-tracking branch 'public/feature4516'Nick Mathewson2011-11-24
|\ \ | |/ |/|
| * New UserspaceIOCPBuffers option to set SO_{SND,RCV}BUF to zeroNick Mathewson2011-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running with IOCP, we are in theory able to use userspace- allocated buffers to avoid filling up the stingy amount of kernel space allocated for sockets buffers. The bufferevent_async implementation in Libevent provides this ability, in theory. (There are likely to be remaining bugs). This patch adds a new option that, when using IOCP bufferevents, sets each socket's send and receive buffers to 0, so that we should use this ability. When all the bugs are worked out here, if we are right about bug 98, this might solve or mitigate bug 98. This option is experimental and will likely require lots of testing and debugging.
* | Merge branch 'bug2474'Nick Mathewson2011-11-23
|\ \ | |/ |/| | | | | | | | | | | Had to resolve conflicts wrt the " (using bufferevents)" addition to the startup string. Conflicts: src/or/main.c
| * Tweak the "this is not a stable release" warning some moreNick Mathewson2011-11-23
| |
| * Tweak the startup message to be more helpfulNick Mathewson2011-04-28
| | | | | | | | | | | | | | | | Instead of just saying "boogity boogity!" let's actually warn people that they need to configure stuff right to be safe, and point them at instructions for how to do that. Resolves bug 2474.
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-10-26
|\ \
| * \ Merge remote-tracking branch 'public/cov_run224_022' into maint-0.2.2Nick Mathewson2011-10-26
| |\ \
| | * | Check return of init_keys() ip_address_changed: fix Coverity CID 484Nick Mathewson2011-10-06
| | | |
* | | | Add new stats type: descriptor fetch statsSebastian Hahn2011-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used for the bridge authority currently, to get a better intuition on how many descriptors are actually fetched from it and how many fetches happen in total. Implements ticket 4200.
* | | | Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson2011-10-07
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
| * | | | Don't warn of stray Bridges if managed proxies are still unconfigured.George Kadianakis2011-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With managed proxies you would always get the error message: "You have a Bridge line using the X pluggable transport, but there doesn't seem to be a corresponding ClientTransportPlugin line." because the check happened directly after parse_client_transport_line() when managed proxies were not fully configured and their transports were not registered. The fix is to move the validation to run_scheduled_events() and make sure that all managed proxies are configured first.
| * | | | Updated #includes etc. to use transports.[ch].George Kadianakis2011-07-18
| | | | |
| * | | | Put some last missing pieces together.George Kadianakis2011-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add some utility transport functions in circuitbuild.[ch] so that we can use them from pt.c. * Make the accounting system consider traffic coming from proxies. * Make sure that we only fetch bridge descriptors when all the transports are configured.
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-10-07
|\ \ \ \ \ | | |/ / / | |/| | |