Commit Graph

15517 Commits

Author SHA1 Message Date
Nick Mathewson
43e15300ba MSVC build issue: make 'const' in declaration match 'const' in definition
MSVC warns if you declare a function as having a "int foo" argument
and then implement it with a "const int foo" argument, even though
the latter "const" is not a part of the function's interface.
2012-05-14 13:05:36 -04:00
Nick Mathewson
757725ffde MSVC build issue: we use INLINE as the one that will magically work 2012-05-14 13:04:37 -04:00
Nick Mathewson
7134be0637 MSVC build issue: add magic to make openssl headers in aes.c work 2012-05-14 13:04:13 -04:00
Nick Mathewson
02d206a58b Be a good git person: store nmakefiles in correct text fmt 2012-05-14 13:01:05 -04:00
Nick Mathewson
f1fca8aa4d Remove the unused torrc.bridge.in. Bug 5622. 2012-05-14 12:37:39 -04:00
Nick Mathewson
67690307fb Add some MSVC stuff to gitignore 2012-05-14 12:35:10 -04:00
Nick Mathewson
c5e87ef234 We do not need to define _WIN32 by hand; MSVC does that for us
Bug 5858; fix on 0.2.3.12-alpha
2012-05-14 12:22:51 -04:00
Nick Mathewson
b6028b9e8b Fix win32 compilation of 31eb73f88e 2012-05-14 12:08:05 -04:00
Nick Mathewson
31eb73f88e Do not publish the "git-XXX" tag in server descriptors
Instead, allow packagers to put a 'TOR_BUILD_TAG' field in the
server descriptor to indicate a platform-specific value, if they
need to.  (According to weasel, this was his use for the git- tag
previously.)

This is part of 2988
2012-05-11 18:06:12 -04:00
Nick Mathewson
a2f0e7a65b Cut down on the OS information we give.
For uname-based detection, we now give only the OS name (e.g.,
"Darwin", "Linux".)  For Windows, we give only the Operating System
name as inferred from dw(Major|Minor)version, (e.g., "Windows XP",
"Windows 7"), and whether the VER_NT_SERVER flag is set.

For ticket 2988.
2012-05-11 17:52:53 -04:00
Nick Mathewson
35d08e30d8 An attempt at bug3940 and making AllowDotExit 0 work with MapAddress
This time, I follow grarpamp's suggestion and move the check for
.exit+AllowDotExit 0 to the top of connection_ap_rewrite_and_attach,
before any rewriting occurs.  This way, .exit addresses are
forbidden as they arrive from a socks connection or a DNSPort
request, and not otherwise.

It _is_ a little more complicated than that, though.  We need to
treat any .exit addresses whose source is TrackHostExits as meaning
that we can retry without that exit.  We also need to treat any
.exit address that comes from an AutomapHostsOnResolve operation as
user-provided (and thus forbidden if AllowDotExits==0), so that
transitioning from AllowDotExits==1 to AllowDotExits==0 will
actually turn off automapped .exit addresses.
2012-05-11 17:16:29 -04:00
Nick Mathewson
e6dbe693b7 Make the option-checker code work with osx clang
This is a matter of making gcc and friends squirm more loudly when
they get an option they don't like (-pedantic) and making clang shut
up with it gets an option it tolerates but doesnt know
(-Qunknown-argument).

Is there no better way?
2012-05-11 15:52:36 -04:00
Nick Mathewson
e36cd01633 Try to manually test for whether the compiler hardening flags work
Also, make the check for whether they're on by default work; there's
no need to mess around with this "$enableval" silliness.
2012-05-11 15:08:16 -04:00
Nick Mathewson
4bac223311 Fix a couple of wide lines 2012-05-11 13:01:07 -04:00
Nick Mathewson
0888c2f8f5 When no usable exit satisfies a predicted port, stop predicting it.
Fix for bug 3296.
2012-05-11 12:52:21 -04:00
Nick Mathewson
6757261e8f Raise thresholds for declaring bootstrapping complete.
This patch changes the total serverdesc threshold from 25% to 75%
and the exit threshold from 33% to 50%.  The goal is to make
initially constructed circuits less horrible, and to make initial
less awful (since fetching directory information in parallel with
whatever the user is trying to do can hurt their performance).

Implements ticket 3196.
2012-05-11 12:09:00 -04:00
Nick Mathewson
e0655708a2 Merge remote-tracking branch 'asn/bug4865_take2' 2012-05-11 11:52:51 -04:00
Nick Mathewson
84ddc4b6aa Merge remote-tracking branch 'public/bug5091' 2012-05-11 11:45:40 -04:00
Roger Dingledine
648db9a4b7 Merge branch 'maint-0.2.2' 2012-05-10 17:57:31 -04:00
Roger Dingledine
436654ee96 fix over-wide line from f661747370 2012-05-10 17:46:19 -04:00
Nick Mathewson
02a650786b Fix O(n^2) performance when parsing a big pile of extrainfos
We were doing an O(n) strlen in router_get_extrainfo_hash() for
every one we tried to parse.  Instead, have
router_get_extrainfo_hash() take the length of the extrainfo as an
argument, so that when it's called from
extrainfo_parse_from_string(), it doesn't do a strlen() over the
whole pile of extrainfos.
2012-05-10 17:41:31 -04:00
Nick Mathewson
62f8e3926d Merge remote-tracking branch 'public/bug4591' 2012-05-10 15:55:12 -04:00
Nick Mathewson
0b1a334842 Merge branch 'bug5786' 2012-05-10 15:44:41 -04:00
Nick Mathewson
c78a42685f Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/common/util.c
	src/test/test_util.c
2012-05-10 15:41:04 -04:00
Nick Mathewson
79c4c8195a Merge branch 'bug5786_range_022' into maint-0.2.2 2012-05-10 15:38:57 -04:00
Nick Mathewson
1cf970c3db Merge remote-tracking branch 'asn/bug5540' 2012-05-10 14:24:17 -04:00
Nick Mathewson
57ed459b0d Refactor new getcwd code
Make sure that the "path_length *= 2" statement can't overflow.

Move the "malloc and getcwd" loop into its own function.
2012-05-10 14:20:15 -04:00
Nick Mathewson
e30a4311e2 Merge remote-tracking branch 'linus/bug5146' 2012-05-10 14:07:23 -04:00
Nick Mathewson
8c09923f20 Merge remote-tracking branch 'origin/maint-0.2.2' 2012-05-10 11:50:14 -04:00
Ravi Chandra Padmala
5bbf04dc97 Add changes/bug5760 2012-05-10 12:55:33 +05:30
Ravi Chandra Padmala
f661747370 Add missing CRLFs to AUTHCHALLENGE failure replies
Fix #5760
2012-05-10 11:13:09 +05:30
Nick Mathewson
98a30daf34 Fix a segfault in pt/protocol test
Now that the pt code logs mp->argv[0] all over the place, we need to
be sure to set up mp->argv in our tests.

Bugfix on e603692adc, not in any released version.
2012-05-08 09:38:56 -04:00
Nick Mathewson
d9ba9f91d2 Detect out-of-bounds bwweightscale values early in the voting process
If the authorities agreed on a sufficiently bad bwweightscale value
(<=0 or == INT32_MAX), the bandwidth algorithm could make the voters
assert while computing the consensus.

Fix for bug5786; bugfix on 0.2.2.17-alpha
2012-05-07 12:47:13 -04:00
Nick Mathewson
c8a0cceae2 Check more thoroughly for dups when parsing networkstatus parameters
See changes file for details.

Partial fix for bug 5786; fix on 0.2.2.2-alpha.
2012-05-07 12:40:05 -04:00
Nick Mathewson
9b344628ed Handle out-of-range values in tor_parse_* integer functions
The underlying strtoX functions handle overflow by saturating and
setting errno to ERANGE.  If the min/max arguments to the
tor_parse_* functions are equal to the minimum/maximum of the
underlying type, then with the old approach, we wouldn't treat a
too-large value as genuinely broken.

Found this while looking at bug 5786; bugfix on 19da1f36 (in Tor
0.0.9), which introduced these functions.
2012-05-07 12:25:59 -04:00
Nick Mathewson
66dbbc2960 Apply a patch from Gisle Vanem to make tor-gencert build under MSVC
(Note: It makes sense to use tor-gencert on Windows for testing
purposes only.  If you are a directory authority operator, and you
are contemplating running tor-gencert on a Windows box in an actual
production environment, you are probably making a mistake.)
2012-05-07 11:31:08 -04:00
Nick Mathewson
3f48c7575e Merge branch 'bug5645_take2' 2012-05-07 11:09:50 -04:00
Nick Mathewson
f84f75c59c Make a cast less const-violating; make a field size explicit. 2012-05-07 11:09:02 -04:00
George Kadianakis
d2e9d17134 Reorder rend_mid_rendezvous() to do protocol violation checks on top. 2012-05-07 18:05:54 +03:00
Nick Mathewson
120d524fba Merge branch 'bug5070_take2' 2012-05-07 11:03:33 -04:00
Nick Mathewson
eefdb9eec2 Using %d to printf an enum may not be by-the-standard okay. 2012-05-07 11:02:17 -04:00
Nick Mathewson
74810f95ad Fix an overwide line 2012-05-07 10:59:23 -04:00
Nick Mathewson
39e69a0a8c Fix comments: There is no such thing as a NUL pointer 2012-05-07 10:57:59 -04:00
Nick Mathewson
a75941dcd5 Changes file for bug 5070 2012-05-07 09:56:12 -04:00
Nick Mathewson
9ceec869b5 Document some transports.c behaviors and assumptions 2012-05-07 09:55:14 -04:00
Karsten Loesing
24731ce6a7 Update to the May 2012 GeoIP database. 2012-05-07 12:50:47 +02:00
Roger Dingledine
c648f9751f fix quad typo in comments
i assume if nickm maintained "libeven" this would never have been
introduced. :)
2012-05-07 01:54:53 -04:00
Nick Mathewson
a1538d607d Fix bug 5762: detect missing accept4 that gives ENOSYS
We had been checking for EINVAL, but that means that SOCK_* isn't
supported, not that the syscall itself is missing.

Bugfix on 0.2.3.1-alpha, which started to use accept4.
2012-05-04 13:18:14 -04:00
Linus Nordberg
6b4af10716 Ignore [::] when building descriptors.
This is how IPv6 says "0.0.0.0" and something we will have to
translate into a globally reachable address before putting it in a
descriptor.

The fix is a short term solution until a real one is implemented.

Closes #5146.
2012-05-03 22:19:38 +02:00
George Kadianakis
e603692adc Make transports.c logs a bit more helpful. 2012-05-03 04:40:36 +03:00