aboutsummaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2014-08-28Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-08-28Resume expanding abbreviations for command-line optionsRoger Dingledine
The fix for bug 4647 accidentally removed our hack from bug 586 that rewrote HashedControlPassword to __HashedControlSessionPassword when it appears on the commandline (which allowed the user to set her own HashedControlPassword in the torrc file while the controller generates a fresh session password for each run). Fixes bug 12948; bugfix on 0.2.5.1-alpha.
2014-08-26Merge remote-tracking branch 'public/bug10163'Nick Mathewson
2014-08-25Remove the assigned-but-unused chosen_named_idx local variableNick Mathewson
It had been used in consensus method 1. But now that 13 is the minimum (see #10163), we don't need it around. Found by sysrqb.
2014-08-24Whitespace fixesNick Mathewson
2014-08-24Terser ways to sandbox-allow related filenamesNick Mathewson
Using the *_array() functions here confused coverity, and was actually a bit longer than we needed. Now we just use macros for the repeated bits, so that we can mention a file and a suffix-appended version in one line.
2014-08-24Merge branch 'bug11792_1_squashed'Nick Mathewson
Conflicts: src/or/circuitlist.c
2014-08-24When looking for conns to close, count the age of linked queued dataNick Mathewson
Specifically, count the age of the data queued in a linked directory connection's buffers when counting a stream's age.
2014-08-24Kill non-tunneled directory connections when handling OOM.Nick Mathewson
Another part of 11792.
2014-08-24Count zlib buffer memory towards OOM totals.Nick Mathewson
Part of 11792. (Uses the zlib-endorsed formula for memory needs for inflate/deflate from "zconf.h".)
2014-08-22Tidy status handling in rendservice.cNick Mathewson
We had some code to fix up the 'status' return value to -1 on error if it wasn't set, but it was unreachable because our code was correct. Tweak this by initializing status to -1, and then only setting it to 0 on success. Also add a goto which was missing: its absence was harmless. [CID 718614, 718616]
2014-08-21Mark one use of networkstatus_check_document_signature as (void)Nick Mathewson
Also explain why we aren't checking its return value. [CID 1198197]
2014-08-21remove meaningless checks for chunks==NULL in dirserv stuffNick Mathewson
Also, make it clearer that chunks cannot be NULL [CID 1031750, 1031751]
2014-08-21Allow rend_service_intro_free to get called with NULLNick Mathewson
(We allowed it previously, but produced an LD_BUG message when it happened, which is not consistent Also, remove inconsistent NULL checks before calling rend_service_intro_free. (Removing the check is for CID 718613)
2014-08-21Remove a dead check for errmsg in handle_control_authenticateNick Mathewson
Coverity doesn't like doing NULL checks on things that can't be NULL; I like checking things where the logic for their not being NULL is nontrivial. Let's compromise, and make it obvious that this field can't be NULL. [Coverity CID 202004]
2014-08-21Add a missing goto to an unusable branch and make the branch LD_BUG.Nick Mathewson
(It's LD_BUG to reach this point because the hashed password values were tested earlier from options_validate) [Coverity CID 1232091]
2014-08-21Explicitly cast when dividing ints then implicitly casting to double.Nick Mathewson
Coverity thinks that when we do "double x = int1/int2;", we probably meant "double x = ((double)int1) / int2;". In these cases, we didn't. [Coverity CID 1232089 and 1232090]
2014-08-20Merge branch 'bug12205_take2_squashed'Nick Mathewson
2014-08-20Unit testing entry_is_time_to_retry().rl1987
2014-08-20Write comments for members of periods array.rl1987
2014-08-20Rewriting entry_is_time_to_retry() using table approach.rl1987
2014-08-20Merge branch 'bug10116_squashed'Nick Mathewson
2014-08-20Don't allocate an extra smartlist in the OOM handlerNick Mathewson
Fixes issue 10116
2014-08-20fix remaining compilation problemsNick Mathewson
2014-08-20Merge remote-tracking branch 'public/bug12908_025'Nick Mathewson
2014-08-20Warn if Tor is a relay and a HSSathyanarayanan Gunasekaran
Closes 12908; see #8742
2014-08-20Merge remote-tracking branch 'public/bug12728_024'Nick Mathewson
2014-08-20Merge remote-tracking branch 'public/bug12700_024'Nick Mathewson
2014-08-18When counting memory from closing a connection, count the dir conn tooNick Mathewson
Fix part of bug 11972
2014-08-18Fix relay_command_to_string(); solve 12700.Nick Mathewson
Two bugs here: 1) We didn't add EXTEND2/EXTENDED2 to relay_command_to_string(). 2) relay_command_to_string() didn't log the value of unrecognized commands. Both fixed here.
2014-08-18Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-08-18Fix windows warning introduced by 0808ed83f9cf312abe229Nick Mathewson
This will fix the warning "/src/or/config.c:6854:48: error: unused parameter 'group_readable'" that I introduced while fixing 12864. Bug not in any released version of Tor.
2014-08-15Remove implementation code for all pre-13 consensus methods.Nick Mathewson
Also remove a test for the way that we generated parameter votes before consensus method 12.
2014-08-15Remove support for generating consensuses with methods <= 9.Nick Mathewson
The last patch disabled these; this one removes the code to implement them.
2014-08-15No longer advertise or negotiate any consensus method before 13.Nick Mathewson
Implements proposal 215; closes ticket 10163. Why? From proposal 215: Consensus method 1 is no longer viable for the Tor network. It doesn't result in a microdescriptor consensus, and omits other fields that clients need in order to work well. Consensus methods under 12 have security issues, since they let a single authority set a consensus parameter. ... For example, while Tor 0.2.4.x is under development, authorities should really not be running anything before Tor 0.2.3.x. Tor 0.2.3.x has supported consensus method 13 since 0.2.3.21-rc, so it's okay for 0.2.4.x to require 13 as the minimum method. We even might go back to method 12, since the worst outcome of not using 13 would be some warnings in client logs. Consensus method 12 was a security improvement, so we don't want to roll back before that.
2014-08-15Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-08-15Hand-fix a few global_circuit_list casesNick Mathewson
2014-08-15Autoconvert most circuit-list iterations to smartlist iterationsNick Mathewson
Breaks compilation. Used this coccinelle script: @@ identifier c; typedef circuit_t; iterator name TOR_LIST_FOREACH; iterator name SMARTLIST_FOREACH_BEGIN; statement S; @@ - circuit_t *c; ... - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head) + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c) S + SMARTLIST_FOREACH_END(c);
2014-08-15Some documentation fixes for #12864.George Kadianakis
2014-08-15Start converting circuitlist to smartlist.Nick Mathewson
2014-08-15Documentation fix for policy_summarize().Nick Mathewson
Spotted by "epilys"
2014-08-15Restore functionality for CookieAuthFileGroupReadable.Nick Mathewson
When we merged the cookieauthfile creation logic in 33c3e60a37, we accidentally took out this feature. Fixes bug 12864, bugfix on 0.2.5.1-alpha. Also adds an ExtORPortCookieAuthFileGroupReadable, since there's no reason not to.
2014-08-13Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-08-13Merge remote-tracking branch 'public/bug12848_024' into maint-0.2.5Nick Mathewson
Conflicts: src/or/circuitbuild.c
2014-08-13Apply coccinelle script to replace malloc(a*b)->calloc(a,b)Nick Mathewson
2014-08-12Fix another case of 12848 in circuit_handle_first_hopNick Mathewson
I looked for other places where we set circ->n_chan early, and found one in circuit_handle_first_hop() right before it calls circuit_send_next_onion_skin(). If onion_skin_create() fails there, then n_chan will still be set when circuit_send_next_onion_skin() returns. We should probably fix that too.
2014-08-12Add an extra check in channel_send_destroy for circID==0Nick Mathewson
Prevents other cases of 12848.
2014-08-12Don't send DESTROY to circID 0 when circuit_deliver_create_cell failsNick Mathewson
Cypherpunks found this and wrote this patch. Fix for 12848; fix on (I think) d58d4c0d, which went into 0.0.8pre1
2014-08-08Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-08-06Build circuits more readily when DisableNetwork goes to 0Roger Dingledine
When Tor starts with DisabledNetwork set, it would correctly conclude that it shouldn't try making circuits, but it would mistakenly cache this conclusion and continue believing it even when DisableNetwork is set to 0. Fixes the bug introduced by the fix for bug 11200; bugfix on 0.2.5.4-alpha.