Commit Graph

9691 Commits

Author SHA1 Message Date
Mike Perry f4d6315afa Remove misc unnecessary newlines found by new check. 2010-02-22 16:52:11 -08:00
Mike Perry 245be159af Always weight routers by bandwidth.
Also always predict that we need a high capacity circuit or internal
circuit.
2010-02-22 16:52:11 -08:00
Mike Perry 87a0430a74 Clearly mark directory footer so we parse the new weight line. 2010-02-22 16:52:11 -08:00
Mike Perry 931e073a4f Implement bw weighting selection algorithm. 2010-02-22 16:52:11 -08:00
Mike Perry df1ef2f0f0 Add parsing+verification for bw weight values. 2010-02-22 16:52:11 -08:00
Mike Perry f9d40649fe Perform calculation of consensus bandwidth weights.
Also add bwweightscale consensus param. Use it as our
fixed-point calculation width.
2010-02-22 16:52:11 -08:00
Mike Perry 95aad71678 Add %lld compat defines. 2010-02-22 16:52:10 -08:00
Nick Mathewson 295e6557a9 Merge remote branch 'sebastian/coverity' 2010-02-22 12:46:43 -05:00
Nick Mathewson c084ae145e Merge remote branch 'sebastian/bug1254' 2010-02-22 12:45:01 -05:00
Nick Mathewson d35b8dc582 Make expand_filename into a tor_strdup() alias on windows.
On Windows, we don't have a notion of ~ meaning "our homedir", so we
were deliberately using an #ifdef to avoid calling expand_filename()
in multiple places.  This is silly: The right place to turn a function
into a no-op on a single platform is in the function itself, not in
every single call-site.
2010-02-22 12:42:31 -05:00
Sebastian Hahn 1dfbec482c Remove some redundant code in options_save_current()
get_torrc_fname() does the same thing we did in this code, so let's
replace it.
2010-02-22 12:21:58 +01:00
Sebastian Hahn d41030436c Expand homedirs in paths passed to tor-checkkey
This is so that coverity stops complaining about using a user-supplied
string with the open() syscall. Let's see if it works.
2010-02-22 12:13:58 +01:00
Sebastian Hahn f5112fa487 Zero a cipher completely before freeing it
We used to only zero the first ptrsize bytes of the cipher. Since
cipher is large enough, we didn't zero too many bytes. Discovered
and fixed by ekir. Fixes bug 1254.
2010-02-22 11:41:39 +01:00
Sebastian Hahn b65ad83ebe Break early on unknown extendcircuit purpose
Don't continue handling EXTENDCIRCUIT messages when we get an
unknown purpose.
2010-02-22 10:57:11 +01:00
Sebastian Hahn dcf85eb158 Fix a memory leak, found by coverity 2010-02-22 10:56:54 +01:00
Sebastian Hahn e391a497ec Remove some redundand code in control.c
Found by coverity
2010-02-22 10:41:46 +01:00
Sebastian Hahn 5aa9610dd6 network-status-version must come first in a vote/consensus
Spec conformance issue: The code didn't force the network-status-version
token to be the first token in a v3 vote or consensus.

Problem discovered by Parakeep.
2010-02-22 09:16:26 +01:00
Roger Dingledine 5e8c611673 prepare for 0.2.2.9-alpha 2010-02-22 00:20:55 -05:00
Roger Dingledine b9696b96da bump to 0.2.1.24 2010-02-21 17:27:12 -05:00
Roger Dingledine 603432090d fix typo and garbage grammar 2010-02-21 17:18:42 -05:00
Nick Mathewson 0eb03bc6dd Merge remote branch 'public/cbt-status'
Conflicts:
	ChangeLog
2010-02-20 18:35:19 -05:00
Nick Mathewson 391f75d792 Merge remote branch 'sebastian/bug1143' 2010-02-19 16:58:24 -05:00
Sebastian Hahn 408a828b1f Make the DNSPort option work with libevent 2.x
We need to use evdns_add_server_port_with_base() when configuring
our DNS listener, because libevent segfaults otherwise. Add a macro
in compat_libevent.h to pick the correct implementation depending
on the libevent version.

Fixes bug 1143, found by SwissTorExit
2010-02-19 22:36:53 +01:00
Nick Mathewson 061ffbd7d5 Future-proof the control protocol by ignoring unrecognized keyword args 2010-02-18 12:49:48 -05:00
Nick Mathewson 2d95e02914 Make more arguments in control.c properly case-insensitive. 2010-02-18 12:49:26 -05:00
Mike Perry 2b95d1c0ee Describe the recent timeouts reallocation behavior. 2010-02-18 09:08:32 -08:00
Mike Perry 2258125e1a Move CBT params into consensus. 2010-02-18 09:08:31 -08:00
Mike Perry f459388c29 Add an event for a case where we drop guards.
Also add a comment about an odd CBT timeout edgecase.
2010-02-18 09:08:31 -08:00
Mike Perry ac68704f07 Allow "EXTENDCIRCUIT 0" to omit a path. 2010-02-18 09:08:31 -08:00
Mike Perry 8512e33773 Add BUILDTIMEOUT_SET event for CBT stress testing. 2010-02-18 09:08:31 -08:00
Nick Mathewson 715f104eeb Merge remote branch 'origin/maint-0.2.1'
Conflicts:
	ChangeLog
	configure.in
	contrib/tor-mingw.nsi.in
	src/win32/orconfig.h
2010-02-18 12:01:56 -05:00
Nick Mathewson 4a3bd153c0 Bump version to 0.2.1.23-dev 2010-02-18 11:57:47 -05:00
Sebastian Hahn c2c3a5a3f5 Fix compile 2010-02-18 13:08:57 +01:00
Nick Mathewson e861b3be88 Even more conservative option-setting for SSL renegotiation.
This time, set the SSL3_FLAGS_ALLOW_UNSAFE_RENEGOTIATION flag on every
version before OpenSSL 0.9.8l.  I can confirm that the option value (0x0010)
wasn't reused until OpenSSL 1.0.0beta3.
2010-02-17 23:55:03 -05:00
Nick Mathewson 4e082ec84b Build correctly with Libevent 2.0.4-alpha and later 2010-02-15 16:47:47 -05:00
Nick Mathewson 79bdfb63e9 Remove the --enable-iphone option as needless.
On or-talk, Marco Bonetti reports that recent iPhone SDKs build
Tor fine without it.
2010-02-12 23:06:05 -05:00
Roger Dingledine 3e6a37e61e new dannenberg address; make moria2's demise official. 2010-02-12 14:31:08 -05:00
Roger Dingledine 33f8dcae6a prepare for 0.2.1.23 2010-02-12 12:35:40 -05:00
Sebastian Hahn fe18275563 Add Windows version detection for Vista and 7
Vista is Windows 6.0, and 7 is Windows 6.1. Fixes bug 1097.

Also fix a coding style violation.
2010-02-10 08:40:44 +01:00
Nick Mathewson a6a1b8b815 Merge remote branch 'origin/maint-0.2.1' 2010-02-09 12:58:25 -05:00
Nick Mathewson a4065cd832 Merge remote branch 'sebastian/bug925' 2010-02-09 12:50:54 -05:00
Nick Mathewson 6dd71d314d Merge remote branch 'sebastian/bug1238' 2010-02-09 12:50:45 -05:00
Nick Mathewson d784eecad9 Merge remote branch 'sebastian/exit-notice' 2010-02-09 12:47:38 -05:00
Nick Mathewson c0d682686a Make tor_addr_copy() conform to memcpy requirements
The src and dest of a memcpy() call aren't supposed to overlap,
but we were sometimes calling tor_addr_copy() as a no-op.

Also, tor_addr_assign was a redundant copy of tor_addr_copy(); this patch
removes it.
2010-02-09 12:32:10 -05:00
Sebastian Hahn 253fd21ae1 Fix a whitespace violation 2010-02-09 09:10:07 +01:00
Sebastian Hahn 1e49c908f7 Speed up the execution of exit_policy_is_general_exit_helper()
It isn't necessary to walk through all possible subnets when the policy
we're looking at doesn't touch that subnet.
2010-02-09 09:10:07 +01:00
Sebastian Hahn 01030a4db2 Another unit test for exit_policy_is_general_exit() 2010-02-09 09:10:03 +01:00
Sebastian Hahn 0e0c31b1b8 Fix the path to the exit-notice file in torrc.sample
Also reword it slightly to reflect the fact that no packagers
ship the file.
2010-02-08 23:36:01 +01:00
Sebastian Hahn 20422cde2b 0/8 doesn't count as a /8 subnet towards an Exit flag 2010-02-08 16:46:22 +01:00
Sebastian Hahn b2b99a70c0 Don't spam controllers with TOO_MANY_CONNECTIONS events
We implemented ratelimiting for warnings going into the logfile, but didn't
rate-limit controller events. Now both log warnings and controller events
are rate-limited.
2010-02-08 16:45:36 +01:00