aboutsummaryrefslogtreecommitdiff
path: root/src/or
Commit message (Collapse)AuthorAge
* Add --disable-mempools configure optionAndrea Shepard2014-05-12
|
* Make --disable-buf-freelists build and pass unit testsAndrea Shepard2014-04-29
|
* Fix capitalization of MaxMemInQueuesNick Mathewson2014-04-28
| | | | | This won't affect anybody's configuration, but it makes it match what we documented. Fixes part of 11634.
* Actually put ExtORPortCookieAuthFile into config.cNick Mathewson2014-04-28
| | | | Fixes bug 11635; bugfix on 0.2.5.1-alpha.
* Merge branch 'scanbuild_fixes'Nick Mathewson2014-04-25
|\
| * scan-build: sizeof(ptr*) in a debugging log in ext_orport.cNick Mathewson2014-04-19
| | | | | | | | | | | | Instead of taking the length of a buffer, we were taking the length of a pointer, so that our debugging log would cover only the first sizeof(void*) bytes of the client nonce.
| * scan-build: bulletproof last-chance errormsg generation in rendservice.cNick Mathewson2014-04-18
| | | | | | | | | | | | | | If 'intro' is NULL in these functions, I'm pretty sure that the error message must be set before we hit the end. But scan-build doesn't notice that, and is worried that we'll do a null-pointer dereference in the last-chance errormsg generation.
| * scan-build: Have clear_pending_onions walk the lists more obviouslyNick Mathewson2014-04-18
| | | | | | | | | | | | | | As it stands, it relies on the fact that onion_queue_entry_remove will magically remove each onionskin from the right list. This patch changes the logic to be more resilient to possible bugs in onion_queue_entry_remove, and less confusing to static analysis tools.
| * scan-build: in cpuworker, initialize tv_startNick Mathewson2014-04-18
| | | | | | | | | | | | | | scan-build doesn't realize that a request can't be timed at the end unless it's timed at the start, and so it's not possible for us to be subtracting start from end without start being set. Nevertheless, let's not confuse it.
| * scan-build: get_proxy_addrport should always set its outputsNick Mathewson2014-04-18
| | | | | | | | | | | | | | When get_proxy_addrport returned PROXY_NONE, it would leave addr/port unset. This is inconsistent, and could (if we used the function in a stupid way) lead to undefined behavior. Bugfix on 5b050a9b0, though I don't think it affects tor-as-it-is.
| * scan-build: when logging a path length, check build_state.Nick Mathewson2014-04-18
| | | | | | | | | | | | Throughout circuituse, when we log about a circuit, we log its desired path length from build_state. scan-build is irrationally concerned that build_state might be NULL.
| * scan-build: Be consistent with a needless check in circuitmux.cNick Mathewson2014-04-18
| | | | | | | | | | | | | | | | | | In circuitmux_detach_all_circuits, we check whether an HT iterator gives us NULL. That should be impossible for an HT iterator. But our checking it has confused scan-build (justly) into thinking that our later use of HT_NEXT_RMV might not be kosher. I'm taking the coward's route here and strengthening the check. Bugfix on fd31dd44. (Not a real bug though)
| * scan-build: Avoid crashing on BUG in circuit_get_by_rend_token_and_purposeNick Mathewson2014-04-18
| | | | | | | | | | | | | | If we fail in circuit_get_by_rend_token_and_purpose because the circuit has no rend_info, don't try to reference fiends from its rend_info when logging an error. Bugfix on 8b9a2cb68, which is going into Tor 0.2.5.4-alpha.
| * scan-build: circuit_cpath_support_ntor had a dead initializationNick Mathewson2014-04-18
| | | | | | | | We were initializing cpath twice, which doesn't make sense.
| * scan-build: check impossible null-pointer case in buffers.cNick Mathewson2014-04-18
| | | | | | | | | | | | When maintaining buffer freelists, we don't skip more than there are, so (*chp) can't be null to begin with. scan-build has no way to know that.
* | whitespace fixNick Mathewson2014-04-24
| |
* | Merge remote-tracking branch 'public/bug11553_025'Nick Mathewson2014-04-24
|\ \
| * \ Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson2014-04-23
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/or/circuitbuild.c
| | * | Improvements to #11553 fix based on reviewNick Mathewson2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a per-channel ratelim_t to control the rate at which we report failures for each channel. Explain why I picked N=32. Never return a zero circID. Thanks to Andrea and to cypherpunks.
| * | | Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson2014-04-18
| |\| |
| | * | Add a rate-limiter for the other circuitID exhaustion warningNick Mathewson2014-04-18
| | | |
| * | | Diagnostic warning to see if it's pending destroys causing 11553Nick Mathewson2014-04-18
| | | |
| * | | Merge remote-tracking branch 'public/bug11553_024' into bug11553_025Nick Mathewson2014-04-18
| |\| | | | | | | | | | | | | | | | | | Conflicts: src/or/channel.h
| | * | Switch to random allocation on circuitIDs.Nick Mathewson2014-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a possible root cause of 11553 by only making 64 attempts at most to pick a circuitID. Previously, we would test every possible circuit ID until we found one or ran out. This algorithm succeeds probabilistically. As the comment says: This potentially causes us to give up early if our circuit ID space is nearly full. If we have N circuit IDs in use, then we will reject a new circuit with probability (N / max_range) ^ MAX_CIRCID_ATTEMPTS. This means that in practice, a few percent of our circuit ID capacity will go unused. The alternative here, though, is to do a linear search over the whole circuit ID space every time we extend a circuit, which is not so great either. This makes new vs old clients distinguishable, so we should try to batch it with other patches that do that, like 11438.
| | * | Supply better and less frequent warnings on circID exhaustionNick Mathewson2014-04-18
| | | | | | | | | | | | | | | | Fixes the surface behavior of #11553
* | | | Merge branch 'bug11396_v2_squashed'Nick Mathewson2014-04-24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/or/main.c
| * | | | Expose the real maxmeminqueues via a GETINFONick Mathewson2014-04-24
| | | | | | | | | | | | | | | | | | | | That is, GETINFO limits/max-mem-in-queues
| * | | | Change the logic for the default for MaxMemInQueuesNick Mathewson2014-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we can't detect the physical memory, the new default is 8 GB on 64-bit architectures, and 1 GB on 32-bit architectures. If we *can* detect the physical memory, the new default is CLAMP(256 MB, phys_mem * 0.75, MAX_DFLT) where MAX_DFLT is 8 GB on 64-bit architectures and 2 GB on 32-bit architectures. You can still override the default by hand. The logic here is simply trying to choose a lower default value on systems with less than 12 GB of physical RAM.
| * | | | get_total_system_memory(): see how much RAM we haveNick Mathewson2014-04-24
| | | | |
* | | | | Merge remote-tracking branch 'public/bug10268'Nick Mathewson2014-04-23
|\ \ \ \ \
| * | | | | Give no answer, not NOTIMPL, for unsupported DNS query typesNick Mathewson2014-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to reports, most programs degrade somewhat gracefully on getting no answer for an MX or a CERT for www.example.com, but many flip out completely on a NOTIMPL error. Also, treat a QTYPE_ALL query as just asking for an A record. The real fix here is to implement proposal 219 or something like it. Fixes bug 10268; bugfix on 0.2.0.1-alpha. Based on a patch from "epoch".
* | | | | | Merge remote-tracking branch 'public/bug11200'Nick Mathewson2014-04-23
|\ \ \ \ \ \
| * | | | | | should_disable_dir_fetches() now returns 1 if DisableNetwork==1Nick Mathewson2014-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prevents LD_BUG warnings and bootstrap failure messages when we try to do directory fetches when starting with DisableNetwork == 1, a consensus present, but no descriptors (or insufficient descriptors) yet. Fixes bug 11200 and bug 10405. It's a bugfix on 0.2.3.9-alpha. Thanks to mcs for walking me through the repro instructions!
* | | | | | | Merge branch 'bug11156_issue2_squashed'Nick Mathewson2014-04-23
|\ \ \ \ \ \ \
| * | | | | | | Slightly improve the documentation of src/or/transports.cGeorge Kadianakis2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it clear that a SIGHUP is not the only action that can cause a config re-read.
| * | | | | | | Rename the got_hup element of managed proxies.George Kadianakis2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we need to toggle that element in non-SIGHUP situations too where the config was re-read (like in SETCONF or RESETCONF).
| * | | | | | | Don't halt bootstrap to figure out if we should restart PT proxies.George Kadianakis2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, figure out if we should restart PT proxies _immediately_ after we re-read the config file.
* | | | | | | | Merge remote-tracking branch 'public/bug9229_025'Nick Mathewson2014-04-23
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/or/entrynodes.c
| * | | | | | | Make num_bridges_usable work properly.Nick Mathewson2014-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My first implementation was broken, since it returned "whether there is one bridge" rather than "how many bridges." Also, the implementation for the n_options_out feature in choose_random_entry_impl was completely broken due to a missing *.
| * | | | | | | Fix our check for the "first" bridge descriptor.Nick Mathewson2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is meant to be a better bug 9229 fix -- or at least, one more in tune with the intent of the original code, which calls router_retry_directory_downloads() only on the first bridge descriptor.
* | | | | | | | Merge remote-tracking branch 'public/bug9963_v2_024'Nick Mathewson2014-04-18
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | |
| * | | | | | | Log descriptor-download bootstrapping messages less verboselyNick Mathewson2014-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for 9963. I say this is a feature, but if it's a bugfix, it's a bugfix on 0.2.4.18-rc. Old behavior: Mar 27 11:02:19.000 [notice] Bootstrapped 50%: Loading relay descriptors. Mar 27 11:02:20.000 [notice] Bootstrapped 51%: Loading relay descriptors. Mar 27 11:02:20.000 [notice] Bootstrapped 52%: Loading relay descriptors. ... [Many lines omitted] ... Mar 27 11:02:29.000 [notice] Bootstrapped 78%: Loading relay descriptors. Mar 27 11:02:33.000 [notice] We now have enough directory information to build circuits. New behavior: Mar 27 11:16:17.000 [notice] Bootstrapped 50%: Loading relay descriptors Mar 27 11:16:19.000 [notice] Bootstrapped 55%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 60%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 65%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 70%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 75%: Loading relay descriptors Mar 27 11:16:21.000 [notice] We now have enough directory information to build circuits.
* | | | | | | | Merge remote-tracking branch 'public/sandbox_fixes_rebased_2'Nick Mathewson2014-04-16
|\ \ \ \ \ \ \ \
| * | | | | | | | Block certain option transitions while sandbox enabledNick Mathewson2014-04-16
| | | | | | | | |
| * | | | | | | | Don't reload logs or rewrite pidfile while sandbox is activeNick Mathewson2014-04-16
| | | | | | | | |
| * | | | | | | | Don't allow change to ConnLimit while sandbox is activeNick Mathewson2014-04-16
| | | | | | | | |
| * | | | | | | | Allow reloading torrc and writing to router-stabilityNick Mathewson2014-04-16
| | | | | | | | |
| * | | | | | | | Add a couple of missing renames so the server sandbox works againNick Mathewson2014-04-16
| | | | | | | | |
| * | | | | | | | Get Libevent's PRNG functioning under the linux sandboxNick Mathewson2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libevent uses an arc4random implementation (I know, I know) to generate DNS transaction IDs and capitalization. But it liked to initialize it either with opening /dev/urandom (which won't work under the sandbox if it doesn't use the right pointer), or with sysctl({CTL_KERN,KERN_RANDOM,RANDOM_UUIC}). To make _that_ work, we were permitting sysctl unconditionally. That's not such a great idea. Instead, we try to initialize the libevent PRNG _before_ installing the sandbox, and make sysctl always fail with EPERM under the sandbox.
| * | | | | | | | Make sure everything using an interned string is preceded by a logNick Mathewson2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (It's nice to know what we were about to rename before we died from renaming it.)