Nick Mathewson
0475552140
Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6
2015-04-06 09:26:16 -04:00
Nick Mathewson
fe69a7e1d7
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-04-06 09:25:37 -04:00
Yawning Angel
dc3cb00080
Handle empty/zero length encoded intro points more gracefully.
...
In theory these should never the triggered as the only caller now
validates the parameters before this routine gets called.
2015-04-06 09:21:43 -04:00
Yawning Angel
7b5f558da4
Treat empty introduction points sections as missing.
...
Found by DonnchaC.
2015-04-06 09:20:46 -04:00
Yawning Angel
49ddd92c11
Validate the RSA key size received when parsing INTRODUCE2 cells.
...
Fixes bug 15600; reported by skruffy
2015-04-06 09:18:17 -04:00
Nick Mathewson
24352d0d70
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-04-03 09:47:57 -04:00
George Kadianakis
929a8f199b
Decrease the amount of rend circ relaunches for hidden services.
2015-04-03 09:47:40 -04:00
George Kadianakis
8656cbcfc0
... and if we do get multiple INTRODUCE1s on a circuit, kill the circuit
...
(Sending a nak would be pointless.)
See ticket 15515 for discussion.
2015-04-03 09:40:47 -04:00
Nick Mathewson
c1b36488e9
Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6
2015-04-03 09:39:19 -04:00
Nick Mathewson
3781955f07
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-04-03 09:38:54 -04:00
Nick Mathewson
01e4bc80cd
Merge branch 'bug15515_024' into maint-0.2.4
2015-04-03 09:36:59 -04:00
George Kadianakis
bcb839387e
... and if we do get multiple INTRODUCE1s on a circuit, kill the circuit
...
(Sending a nak would be pointless.)
See ticket 15515 for discussion.
2015-04-03 09:36:05 -04:00
George Kadianakis
8dba8a088d
Block multiple introductions on the same intro circuit.
2015-04-03 09:35:47 -04:00
Yawning Angel
38c8e0bfc5
Fix the windows test failure caused by the #15435 changes.
2015-04-02 03:25:51 +00:00
Sebastian Hahn
e10e6f78b1
Update entrynodes unit test for dirs
...
We no longer base our opinion on whether someone is a directory solely
on the routerstatus we might have for that relay, but also on a
routerinfo. Remove logic in test checking that. This broke unit tests in
05f7336624
.
Reported by toralf on #tor-dev, thanks!
2015-04-01 21:10:39 +02:00
Sebastian Hahn
86002a83d3
Bridges are always dirs
...
This check was accidentally deleted in 05f7336624
.
2015-04-01 21:07:46 +02:00
Nick Mathewson
081b0c0f77
mark dirinfo_type as unused in populate_live_entry_guards
2015-04-01 14:20:01 -04:00
Nick Mathewson
05fbbfe472
Merge remote-tracking branch 'public/remove_old_version_checks'
2015-04-01 14:02:02 -04:00
Nick Mathewson
d366c3354f
Merge branch 'remove_digests'
2015-04-01 13:53:03 -04:00
Nick Mathewson
cd8f13b5cb
Merge branch 'bug13736'
2015-04-01 13:46:50 -04:00
Nick Mathewson
baf24bf4d1
Unindent a block in crypto_set_tls_dh_prime
2015-04-01 13:40:37 -04:00
Nick Mathewson
8ba2d971b1
Remove needless call to crypto_set_tls_dh_prime()
2015-04-01 13:37:47 -04:00
Nick Mathewson
aa7b792250
Merge remote-tracking branch 'yawning/feature15435'
2015-04-01 13:34:14 -04:00
Nick Mathewson
34fa4ad637
Merge remote-tracking branch 'public/bug15515_025'
2015-04-01 12:59:19 -04:00
George Kadianakis
a7eae4ddc5
Block multiple introductions on the same intro circuit.
2015-04-01 12:58:52 -04:00
Nick Mathewson
13209eb6f3
Merge remote-tracking branch 'dgoulet/bug15296_027_01'
2015-04-01 12:50:36 -04:00
Nick Mathewson
0ddd8f06a9
Merge remote-tracking branch 'yawning/feature15471'
2015-04-01 12:47:16 -04:00
Nick Mathewson
c66dd17980
Drop support for --digests
...
This is a fair amount of maintainance burden, and doesn't help much
more than the git microversion.
Closes ticket 14742.
2015-04-01 09:54:20 -04:00
Nick Mathewson
1ac3cb4823
work around lack of AF_CCITT
2015-03-31 15:56:52 -04:00
Nick Mathewson
02c3879f87
Merge remote-tracking branch 'teor/ticket15431-event-mask-tests'
2015-03-31 14:57:04 -04:00
Nick Mathewson
725d6157df
fix some compilation warnings
2015-03-31 14:42:01 -04:00
Nick Mathewson
30e933b136
Merge branch 'ticket14710_squashed'
2015-03-31 14:37:09 -04:00
rl1987
33fbb5011d
Use tor_inet_pton() (not inet_pton()) in testcases.
2015-03-31 14:37:02 -04:00
rl1987
5e759127f8
Remove unused function.
2015-03-31 14:37:02 -04:00
rl1987
b5f84fde49
IPv6 case for whitebox test.
2015-03-31 14:37:02 -04:00
rl1987
a4f89e21a6
Whitebox test for get_interface_address6_via_udp_socket_hack().
...
Also, fix some whitespace mishaps.
2015-03-31 14:37:02 -04:00
rl1987
c03493ad13
Skipping the AF_INET6 case because bug #12377 makes it fail.
2015-03-31 14:37:02 -04:00
rl1987
92fc728d83
Bugfix: we don't want loopback/multicastaddress from _hack().
2015-03-31 14:37:02 -04:00
rl1987
6af471f394
Rework the black box test, like Yawning and nickm suggested.
2015-03-31 14:37:01 -04:00
rl1987
a13f944314
Black box test for get_interface_address6_via_udp_socket_hack().
2015-03-31 14:36:35 -04:00
rl1987
6888523d73
Moving the hacky part of get_interface_address6() into separate function.
2015-03-31 14:36:28 -04:00
Yawning Angel
fa81508eb2
Use prctl() to have the kernel SIGTERM background processes on exit.
...
This uses a Linux-ism to attempt to always clean up background processes
if possible. Note that it is not a catch-all, in that executables with
suid/sgid or elevated capabilities will have the prctl() attribute
stripped as part of the execve().
Resolves ticket 15471.
2015-03-26 14:56:14 +00:00
Yawning Angel
fda61e030e
Implement "TOR_PT_EXIT_ON_STDIN_CLOSE".
...
Background processes spawned by Tor now will have a valid stdin.
Pluggable transports can detect this behavior with the aformentioned
enviornment variable, and exit if stdin ever gets closed.
2015-03-26 12:55:12 +00:00
Nick Mathewson
e5e2644f23
clean up list of paths that cannot be relative
2015-03-25 09:16:04 -04:00
Nick Mathewson
dde4ffeb97
Merge remote-tracking branch 'dgoulet/bug15377_027_01'
2015-03-24 16:27:27 -04:00
David Goulet
2dc5d790d3
Test: add missing libor.a in include.am
...
Also add test-memwipe to .gitignore file.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-03-24 16:04:30 -04:00
Nick Mathewson
9e80fc8171
Merge remote-tracking branch 'sebastian/coverage_builds'
2015-03-24 15:16:49 -04:00
Nick Mathewson
25c3ff4500
Merge remote-tracking branch 'public/bug15269'
2015-03-24 14:59:09 -04:00
Nick Mathewson
112c554fcf
Merge branch 'bug14018'
2015-03-24 14:36:23 -04:00
rl1987
09c54655f1
Complain if relative paths are used in configuration
...
When we validate torrc options, print warning(s) when relative
path(s) been found.
2015-03-24 14:35:52 -04:00
Nick Mathewson
8f951d0196
Put an upper bound on test_workqueue -I argument
...
This makes coverity happy, since it doesn't like us looping against
a value which might be INT_MAX.
This is CID 1268069
2015-03-24 10:49:29 -04:00
Nick Mathewson
fec923d72b
Check return values for tor_addr_parse(default) in config.c
...
In these cases, the address is always a constant "default", so
should always succeed. But coverity can't tell that.
Fixes CID 1291645
2015-03-24 10:46:39 -04:00
Nick Mathewson
dfd6cf9ea2
bump to 0.2.6.6
2015-03-24 10:23:34 -04:00
Nick Mathewson
05f7336624
Remove version checks for microdescriptor support
...
At this point, relays without microdescriptor support are no longer
allowed on the Tor network.
2015-03-24 09:25:35 -04:00
Nick Mathewson
0f31080d63
Stop checking for torrc state files generated by very old Tor versions
...
These haven't worked in so long that if you had a state file of this
kind, the guards in it would be so old that you wouldn't use them
anyway.
2015-03-24 09:24:12 -04:00
Nick Mathewson
190ed66b06
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-23 09:25:35 -04:00
Nick Mathewson
c113544a94
Merge remote-tracking branch 'public/bug15436_025' into maint-0.2.6
2015-03-23 09:25:15 -04:00
Yawning Angel
732f522a42
Fix unaligned access in SipHash-2-4.
...
The compiler is allowed to assume that a "uint64_t *" is aligned
correctly, and will inline a version of memcpy that acts as such.
Use "uint8_t *", so the compiler does the right thing.
2015-03-23 09:20:02 -04:00
Sebastian Hahn
1a50cb88e6
Fix test-network.sh argument parsing
...
The bash on one of my machines didn't understand the question mark
correctly, it didn't end up accepting flavor. We can spell it out
explicitly.
2015-03-22 09:43:50 +01:00
teor
b41a5039f1
Compile-time check that control_event_t.event_mask is big enough
...
Add a compile-time check that the number of events doesn't exceed
the capacity of control_event_t.event_mask.
2015-03-22 14:25:42 +11:00
teor
99c10a95e4
Add unit tests for control_event_is_interesting()
...
Part of ticket 15431, checks for bugs similar to 13085.
2015-03-22 14:24:41 +11:00
Sebastian Hahn
e069a82aa7
build tor-cov-{resolve,gencert}
...
This allows us to run tor-cov-gencert from chutney for coverage builds.
2015-03-22 04:21:08 +01:00
Sebastian Hahn
1228dd293b
Disable assertions during coverage builds
...
This removes roughly 5000 branches in my testing. We never want to
trigger assertions even during tests, so this is sane. Implements #15400 .
2015-03-21 02:34:44 +01:00
Sebastian Hahn
348f2744cf
Initialize two variables
...
This is a trivial change to get around two compiler warnings when
assertions are removed during coverage builds.
2015-03-21 02:00:17 +01:00
Nick Mathewson
e82e600d6e
Here is a test for memwipe.
...
It invokes undefined behavior, I'm afraid, since there's no other
c-legal way to test whether memwipe() works when we're not allowed to
look at it.
Closes ticket 15377.
2015-03-19 18:47:24 -04:00
Nick Mathewson
ca03b10b0c
bump to 0.2.6.5-rc.dev
2015-03-18 16:32:13 -04:00
Nick Mathewson
54d6e5e71e
Merge remote-tracking branch 'public/feature15053'
2015-03-18 14:27:00 -04:00
Nick Mathewson
77c671b7dd
bump to 0.2.6.5-rc
2015-03-18 09:10:48 -04:00
Nick Mathewson
d8263ac254
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-18 08:58:15 -04:00
David Goulet
c9534f7902
Remove extra newline at the end of HS descriptor
...
The rend-spec.txt document doesn't specify this extra newline. Furthermore,
this is the only descryptor type that contains one. Client and HSDir without
this patch still work perfectly since the HS descriptor parsing doesn't
expect a newline at the end.
Fixes #15296
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-03-16 09:04:51 -04:00
Nick Mathewson
e75e0c7278
Make log.o depend on micro-revision.i
...
Otherwise micro-revision.i might not get built on time.
2015-03-15 17:09:58 -04:00
Nick Mathewson
a0f892f190
Simplify the loop.
2015-03-14 14:31:26 -04:00
Nick Mathewson
ddb1889eb8
Add comments for new functions
2015-03-14 14:28:29 -04:00
Nick Mathewson
92d04721a2
remove a needless "if (1)" that was there for indentation; fix indentation.
2015-03-14 14:28:29 -04:00
Nick Mathewson
b78803f9f5
Extract main part of main loop into a separate function
...
For 15176; Shadow would like this.
Based on a patch by Rob Jansen, but revised to have a minimal-sized diff.
2015-03-14 14:28:29 -04:00
Nick Mathewson
7bed9dc73a
Avoid double-parens in log_fn() messages on clang.
...
On clang (and elsewhere?) __PRETTY_FUNCTION__ includes parenthesized
argument lists. This is clever, but it makes our old "%s(): " format
look funny.
This is a fix on 0957ffeb
, aka svn:r288. Fixes bug 15269.
2015-03-14 14:12:03 -04:00
Nick Mathewson
feca329031
Log version when LD_BUG is logged.
...
Closes ticket 15026.
2015-03-14 13:50:23 -04:00
cypherpunks
ce9bd4e04c
Do not distribute common_sha1.i and or_sha1.i.
...
These files get generated automatically so there is need to include them in the
distribution.
2015-03-14 13:00:06 -04:00
cypherpunks
5176f6f103
Remove relative paths to header files.
...
The paths are already in the directory search path of the compiler therefore no
need to include them in the source code.
2015-03-14 13:00:05 -04:00
cypherpunks
7a86d53dee
Clean up generated files.
...
Remove src/or/or_sha1.i and src/common/common_sha1.i on `make clean` and remove
the temporary micro-revision file when its no longer needed.
Additional changes;
- show a message when generating the micro-revision file.
- add the temporary micro revision file to the list of files to be removed on
`make clean` just in case.
- fix indentation of the make rule to improve readability.
2015-03-14 13:00:04 -04:00
cypherpunks
17cbc4350f
Use output variables instead of relative paths.
...
Fixes the following rules in out-of-tree builds;
- check-spaces
- check-docs
- check-logs
- Doxygen
- coverage-html
And cleans up additional directories;
- coverage_html
- doc/doxygen
2015-03-14 13:00:04 -04:00
Nick Mathewson
511ca9b91c
Remove DynamicDHGroups as obsoleted by PluggableTransports or P256.
...
Closes ticket 13736.
2015-03-14 12:40:55 -04:00
Nick Mathewson
4247ce99e5
ug. test, _then_ commit, nick.
2015-03-14 12:14:32 -04:00
Nick Mathewson
f70f1d283e
Do not printf success messages when we are --quieted or --hushed.
...
Fixes 14994. Calling this a bug on when --quiet and --hush began to have
their current behavior.
2015-03-14 12:12:53 -04:00
Nick Mathewson
3a68f2f54e
const-ify the new failure vars, and one old one
2015-03-13 09:41:49 -04:00
Nick Mathewson
833b6d30be
Merge remote-tracking branch 'sebastian/bug15211'
2015-03-13 09:39:04 -04:00
Nick Mathewson
517e0f965b
Remove workarounds for Libevent < 1.3.
...
This actually lets us dump a lot of old cruft that nobody had (I
hope!) tested in ages.
Closes 15248.
2015-03-12 16:59:05 -04:00
Sebastian Hahn
badc81de5b
Don't init hs intro key as side effect of an assert
2015-03-12 18:59:46 +01:00
Sebastian Hahn
447769dd28
Don't init control authchallenge nonce as assert side effect
...
Fixes part of bug 15211.
2015-03-12 18:57:57 +01:00
Nick Mathewson
3ee2fca7ca
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-12 13:16:22 -04:00
Nick Mathewson
eb68ea20f8
Merge remote-tracking branch 'public/feature15212_026' into maint-0.2.6
2015-03-12 13:15:08 -04:00
Nick Mathewson
16b1b2199d
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-12 13:13:06 -04:00
Yawning Angel
b3281fc6d6
Initialize the extorport auth cookie before launching PTs.
...
PTs expect the auth cookie to be available immedieately after launch,
leading to a race condition when PTs opt to cache the extorport cookie
once immediately after startup.
Fixes #15240 .
2015-03-12 13:12:56 -04:00
Sebastian Hahn
68e9f364a0
don't init threads as side effect of assertion
...
Fixes part of bug 15211.
2015-03-12 17:52:37 +01:00
Nick Mathewson
9063f29160
Revert "Make TransProxyType ipfw work correctly"
...
This reverts commit 681802817d
.
(I didn't mean to backport this, but somehow I had based my branch
for #15205 on it.)
2015-03-12 12:49:08 -04:00
Nick Mathewson
eecd410984
Merge remote-tracking branch 'public/bug15205_025' into maint-0.2.5
2015-03-12 12:27:25 -04:00
Nick Mathewson
b683b9af00
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-12 11:37:56 -04:00
Nick Mathewson
d4c1716263
add an explanatory comment
2015-03-12 11:28:18 -04:00
Nick Mathewson
648af0438d
Also, add an assertion to assign_onionskin_to_cpuworker
2015-03-12 11:15:50 -04:00
Nick Mathewson
66c8180207
Fix crash bug when calling cpuworkers_rotate_keyinfo on a client.
...
Fixes bug 15245; bugfix on 0.2.6.3-alpha. Thanks to anonym for reporting!
2015-03-12 11:14:39 -04:00
Nick Mathewson
a00d07ac1b
Bump 025 version to 0.2.5.11
2015-03-12 10:52:09 -04:00
Nick Mathewson
5f46a59ba3
Bump 0.2.4 version.
2015-03-12 10:50:15 -04:00
Nick Mathewson
2bfdfc849b
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-12 10:06:10 -04:00
Nick Mathewson
192ed94410
Use PTHREAD_CREATE_DETACHED macro instead of 1: fix Solaris crash
...
When calling pthread_attr_setdetachstate, we were using 1 as the
argument. But the pthreads documentation says that you have to say
PTHREAD_CREATE_DETACH, which on Solaris is apparently 0x40. Calling
pthread_attr_setdetachstate with 1 crashes on Solaris with FLTBOUNDS.
(Because we're so late in the release cycle, I made the code define
PTHREAD_CREATE_DETACHED if it doesn't exist, so we aren't likely to
break any other platforms.)
This bug was introduced when we made threading mandatory in
0.2.6.1-alpha; previously, we had force-disabled threading on
Solaris. See #9495 discussion.
2015-03-12 10:03:02 -04:00
Nick Mathewson
985687bc4f
Fix check-spaces
2015-03-10 10:10:35 -04:00
Nick Mathewson
d29a8ad564
Add link protocol version counts to the heartbeat message
...
Closes ticket 15212
2015-03-10 10:07:41 -04:00
Nick Mathewson
e732ec295d
Merge commit 'origin/maint-0.2.6^'
2015-03-10 08:36:53 -04:00
Nick Mathewson
99b59dee70
bump 0.2.6 to 0.2.6.4-rc-dev
2015-03-10 08:20:47 -04:00
Nick Mathewson
1af67d7f72
Merge remote-tracking branch 'public/bug15205_025' into maint-0.2.6
2015-03-09 19:47:12 -04:00
Nick Mathewson
59f4c41087
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-09 16:25:41 -04:00
Nick Mathewson
7c9be64e1a
Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6
2015-03-09 16:25:11 -04:00
Nick Mathewson
306f2f0eff
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-03-09 16:24:44 -04:00
Nick Mathewson
220e9be095
Merge remote-tracking branch 'karsten/geoip6-mar2015' into maint-0.2.4
2015-03-09 16:24:07 -04:00
Nick Mathewson
5588e677bd
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2015-03-09 16:23:55 -04:00
Karsten Loesing
62714068d9
Update geoip6 to the March 3 2015 database.
2015-03-09 21:11:52 +01:00
Karsten Loesing
beda8d2934
Update geoip to the March 3 2015 database.
2015-03-09 21:09:44 +01:00
Nick Mathewson
24c031b1a2
Don't use checked strl{cat,cpy} on OSX.
...
There is a bug in the overlap-checking in strlcat that can crash Tor
servers. Fixes bug 15205; this is an OSX bug, not a Tor bug.
2015-03-09 15:09:49 -04:00
Nick Mathewson
64bfc2930a
Restore c89 in 0.2.5
2015-03-09 13:22:58 -04:00
Nick Mathewson
448bd22092
Merge remote-tracking branch 'public/bug14261_025' into maint-0.2.5
2015-03-09 13:17:20 -04:00
Nick Mathewson
62631904cb
GETINFO bw-event-cache to get information on recent BW events
...
Closes 14128; useful to regain functionality lost because of 13988.
2015-03-09 13:13:56 -04:00
Nick Mathewson
e3408248b9
Merge remote-tracking branch 'public/bug13988_025' into maint-0.2.5
2015-03-09 13:12:54 -04:00
Nick Mathewson
410ce4cb49
Merge remote-tracking branch 'public/bug15088_025' into maint-0.2.5
2015-03-09 13:09:50 -04:00
Nick Mathewson
ed7f2482e2
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-09 13:08:20 -04:00
Nick Mathewson
fb0de57ba2
Merge remote-tracking branch 'public/feature15006_026' into maint-0.2.6
2015-03-09 13:05:27 -04:00
Nick Mathewson
0ec135b696
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-09 11:14:03 -04:00
Tom van der Woerdt
d39ede7f20
testing_common.c: avoid side-effects of tor_assert
2015-03-09 11:10:58 -04:00
Nick Mathewson
bd80ba9a9f
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-09 11:10:04 -04:00
Nick Mathewson
a7f75b2056
Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6
2015-03-09 11:09:49 -04:00
Nick Mathewson
1a7419c3df
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-03-09 11:09:30 -04:00
Nick Mathewson
6704e18dd2
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2015-03-09 11:08:57 -04:00
Nick Mathewson
4ced3b59aa
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 15:19:43 +01:00
Nick Mathewson
de2c5ad815
Revert "Missing dependencies; fixes 15127."
...
This reverts commit 930ab95e1f
.
2015-03-04 15:18:33 +01:00
Nick Mathewson
98822df3dc
Make boostrap events include hostname ANDaddr AND digest
2015-03-04 14:23:59 +01:00
Nick Mathewson
6ae9769b29
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 12:29:25 +01:00
Nick Mathewson
a726cd76df
Merge remote-tracking branch 'public/bug15064_025' into maint-0.2.6
2015-03-04 12:26:43 +01:00
Nick Mathewson
681802817d
Make TransProxyType ipfw work correctly
...
Fixes bug 15064; bugfix on 0.2.5.4-alpha.
2015-03-04 12:25:52 +01:00
Nick Mathewson
55e1fe874d
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 12:20:01 +01:00
Nick Mathewson
c5c4ea2db0
Merge remote-tracking branch 'public/bug15088_025' into maint-0.2.6
2015-03-04 12:19:28 +01:00
Nick Mathewson
d5b2cbea10
Add wait4 to the seccomp2 sandbox allowable syscall list
...
fixes bug 15088. patch from sanic.
2015-03-04 12:18:10 +01:00
Nick Mathewson
6a8550fa3c
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-03-04 12:15:10 +01:00
Nick Mathewson
5ad47aafab
Merge remote-tracking branch 'public/bug15127_025' into maint-0.2.6
2015-03-04 12:14:17 +01:00
Nick Mathewson
2d926d0147
only declare rv when it is used in destination_from_socket. Fixes 15151
2015-03-04 12:12:41 +01:00
Nick Mathewson
930ab95e1f
Missing dependencies; fixes 15127.
2015-03-04 12:09:33 +01:00
Roger Dingledine
a1bdb6e42c
fix typo in comment
2015-03-03 19:12:27 -05:00
Nick Mathewson
81a994ce77
Make the assert related to 15083 a tiny bit more tolerant
2015-03-03 22:25:26 +01:00
Nick Mathewson
71ee53fe9b
Do not leave empty, invalid chunks in buffers during buf_pullup
...
This fixes an assertion failure bug in 15083; bugfix on 0.2.0.10-alpha.
Patch from 'cypherpunks'
2015-03-03 22:21:41 +01:00
Andrea Shepard
d97f43dc8b
Fix formatting
2015-03-02 10:24:58 +00:00
Nick Mathewson
79c69d18b7
Include a HOST item in BOOTSTRAP problem messages
...
Closes ticket 15006.
2015-02-27 11:28:30 -05:00
Nick Mathewson
d7fcaca3fc
Have zero_length_keys.sh use an empty torrc file.
...
Fixes 15033; bugfix on 0.2.6.3-alpha.
2015-02-26 15:22:37 -05:00
Nick Mathewson
3e30d4df7f
Have zero_length_keys.sh use an empty torrc file.
...
Fixes 15033; bugfix on 0.2.6.3-alpha.
2015-02-26 15:21:31 -05:00
Nick Mathewson
1b913777c7
Merge remote-tracking branch 'atagar/trac14806'
2015-02-25 09:30:29 -05:00
Nick Mathewson
0dde4d6fa2
Merge remote-tracking branch 'yawning/bug14922'
2015-02-25 08:56:34 -05:00
Nick Mathewson
2bcb596dcf
Merge remote-tracking branch 'public/bug14129_024' into maint-0.2.4
2015-02-24 13:23:44 -05:00
Nick Mathewson
a9720b90f8
Fix whitespace from tor_x509_cert rename
2015-02-24 12:03:11 -05:00
Nick Mathewson
f253aef14f
Mechanical rename: tor_cert_t -> tor_x509_cert_t
2015-02-24 12:03:10 -05:00
Nick Mathewson
3e9409ef58
Merge remote-tracking branch 'origin/maint-0.2.6'
2015-02-24 11:36:34 -05:00
Nick Mathewson
783a44f9e9
Log less/better about systemd at startup
...
Report errors if the notification fails; report success only if it
succeeds; and if we are not notifying systemd because we aren't
running with systemd, don't log at notice.
2015-02-24 11:11:24 -05:00
Nick Mathewson
e49d63a7ce
Bump master to 0.2.7
2015-02-24 10:31:05 -05:00
Nick Mathewson
af60e7566e
Update test_status.c to accommodate changes in heartbeat messages
...
Fixes #15012 ; bug not in any released Tor
2015-02-24 10:05:34 -05:00
Nick Mathewson
d74a78c58a
Merge branch 'bug14950_logs_squashed'
2015-02-23 13:04:03 -05:00
Nick Mathewson
d221b507c9
Avoid logging natural-language reports that are redundant with bootstrapping
2015-02-23 13:03:56 -05:00
Nick Mathewson
10ae9b9bf5
Usually downgrade middle heartbeat messages when stuff is in-range
2015-02-23 13:03:56 -05:00
Nick Mathewson
098cbcbb9e
Merge branch 'bug14989'
2015-02-23 13:03:07 -05:00
Nick Mathewson
21ac0cd2af
Let AF_UNIX connections through the sandbox
...
Fixes bug 15003; bugfix on 0.2.6.3-alpha.
2015-02-23 12:35:20 -05:00
Nick Mathewson
f1fa85ea73
Fix running with the seccomp2 sandbox
...
We had a regression in 0.2.6.3-alpha when we stopped saying
IPPROTO_TCP to socket(). Fixes bug 14989, bugfix on 0.2.6.3-alpha.
2015-02-23 12:16:08 -05:00
Nick Mathewson
7a1a0a4cd7
Merge remote-tracking branch 'public/bug14988_025'
2015-02-23 11:33:07 -05:00
Nick Mathewson
aeb38bbdce
add another unused-var marker in backtrace.c for 14988
2015-02-23 11:32:04 -05:00
cypherpunks
5246e8f992
Remove lingering mempool code
2015-02-23 11:19:31 -05:00
rl1987
385558c32f
Fix endianness issues in test_config_resolve_my_address().
...
Since resolve_my_address() yields IP address in host order there is
no need to use byteorder functions for conversion.
2015-02-23 09:57:17 -05:00
Nick Mathewson
8a9d86bf05
Merge remote-tracking branch 'public/bug11454_11457'
2015-02-20 01:08:12 -05:00
Nick Mathewson
03a4e97c76
Merge remote-tracking branch 'origin/maint-0.2.5'
2015-02-20 01:05:21 -05:00
Nick Mathewson
1525eeeb49
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-02-20 01:04:49 -05:00
Nick Mathewson
5334bcd7e3
bump version to 0.2.6.3-alpha-dev
2015-02-19 17:20:40 -05:00
Nick Mathewson
251f6cfcd8
Quiet "caching debian-tor for debian-tor" notice
2015-02-19 12:30:34 -05:00
Nick Mathewson
76d8c23ab4
Try to fix authdir_newdesc events
...
We were sending values that were truncated by the length of the
annotations.
2015-02-19 11:35:27 -05:00
Nick Mathewson
cef802a041
Increment version to 0.2.6.3-alpha
2015-02-19 10:05:08 -05:00
Nick Mathewson
b897e386da
Merge branch 'bug12844_macros'
2015-02-19 09:41:36 -05:00
Nick Mathewson
557a0c83f3
Do not try to download an EI for which we don't have a matching SD.
...
This quiets some log messages for #13762 , and adds a better INFO message
for the underlying confusion.
2015-02-19 09:40:36 -05:00
Nick Mathewson
86105a4009
Check ENABLE_TOR2WEB_MODE before any tor2webmode code
2015-02-19 09:09:25 -05:00
Roger Dingledine
64d5e0e417
stop warning each time we check minimum-dir-info
...
We already log whenever our state changes, e.g. whenever new directory
information arrives. This additional log_warn() will at best just add more
log messages, or worse, make the user wonder what she needs to fix.
(Changed after consultation with Yawning.)
2015-02-19 06:27:14 -05:00
Roger Dingledine
70f46f7ae6
don't update dir_info_status when we have minimum dir info
...
Nothing ever uses the string when we're in "have minimum dir info"
state. The flow of the function is "check for problems, if you see a
problem write an explanation to dir_info_status and set res to 0". If
you get to the end of the function without any problems, then res =
1 and we're all ready to start making circuits.
(Changed after consultation with Yawning.)
2015-02-19 06:15:25 -05:00
Roger Dingledine
0e4bdc4005
clean up comments and whitespace a bit
2015-02-18 19:27:02 -05:00
Nick Mathewson
b7b8b9ecf9
Downgrade new extrainfo_insert warnings on startup
2015-02-18 13:41:00 -05:00
Nick Mathewson
a767b66640
Merge branch 'bug13762_diagnostic_redux'
2015-02-18 13:29:12 -05:00
Nick Mathewson
d3f714deb8
Patch from cypherpunks to try to diagnose 8387.
2015-02-18 13:25:01 -05:00
Nick Mathewson
e65fe0a747
Improve log messages for diagnosing 13762
2015-02-18 13:05:15 -05:00
Nick Mathewson
843c368475
Merge remote-tracking branch 'yawning/cid1270894'
2015-02-18 12:13:54 -05:00
Yawning Angel
39a496eeb8
Actually free measured_guardfraction.
...
CID 1270894
2015-02-18 16:36:57 +00:00
Nick Mathewson
afe10e4707
whitespace fixes
2015-02-18 10:55:56 -05:00
Nick Mathewson
6378bcf4b9
Fix an implicit-narrowing warning
2015-02-18 09:34:15 -05:00
Nick Mathewson
9e6147a40c
Merge remote-tracking branch 'yawning/bug14918'
2015-02-18 09:21:16 -05:00
Nick Mathewson
6cdb213b6c
Combine test_helpers.[ch] and testhelper.[ch]
2015-02-18 09:19:38 -05:00
Nick Mathewson
96211bcf71
Merge branch 'bug9321_rerebase'
...
Conflicts:
src/or/dirvote.h
src/test/include.am
src/test/test_entrynodes.c
2015-02-18 09:17:02 -05:00
George Kadianakis
5c34a53068
Don't exit if we can't find the GuardfractionFile when booting.
...
...just disable the feature in that case.
2015-02-18 09:09:34 -05:00
George Kadianakis
33053d50a0
Final guardfraction preparations for upstream merge.
...
- Write a changes file.
- Change some logs to lesser severities.
2015-02-18 09:09:34 -05:00
George Kadianakis
028ede2f5e
Add unittests for the guardfraction feature.
2015-02-18 09:09:34 -05:00
George Kadianakis
c2b13e22e7
Unittest prep: Move get_yesterday_date_str() to helper file.
...
We want to use this function in our guardfraction unittests, so make a
test_helpers module and move it there.
2015-02-18 09:09:34 -05:00
George Kadianakis
b941f109ac
Calculate relay weighted bandwidth using guardfraction bandwidths.
...
Now use the guardfraction function to calculate individual relay
bandwidth weights.
2015-02-18 09:09:34 -05:00
George Kadianakis
f7a8b19184
Calculate total bandwidth weights using the guardfraction bandwidths.
...
Now use the function introduced in the previous commit, to calculate the
total bandwidth weights when making the consensus.
2015-02-18 09:09:33 -05:00
George Kadianakis
14a3c17ce6
Calculate the guardfraction bandwidth of a guard.
2015-02-18 09:09:33 -05:00
George Kadianakis
f4a63f8eab
Parse GuardFraction info from consensuses and votes.
...
Also introduce the UseGuardFraction torrc option which decides whether
clients should use guardfraction information found in the consensus.
2015-02-18 09:09:33 -05:00
George Kadianakis
db805b9170
Write GuardFraction information to consensus.
...
If we've seen enough votes with guardfraction information, write down
the GuardFraction string in the consensus.
2015-02-18 09:09:33 -05:00
George Kadianakis
7ddfb6aa2f
Write guardfraction information to votes.
...
If a dirauth has guardfraction information about a guard, write it down
when serializing the routerstatus.
2015-02-18 09:09:33 -05:00
George Kadianakis
5ee48d47a7
Parse Guardfraction file and apply results to routerstatuses.
...
Parse the file just before voting and apply its information to the
provided vote_routerstatus_t. This follows the same logic as when
dirauths parse bwauth files.
2015-02-18 09:09:32 -05:00
Yawning Angel
8571e86d27
Fix bootstrap directory information logging.
...
`dir_info_status` is used from main.c:directory_info_has_arrived() to
provide useful (INFO/NOTICE) level logging to users, and should always
be updated regardless of the rate limiting.
2015-02-18 13:58:13 +00:00
Yawning Angel
6fdb179d84
Fix compute_frac_paths_available, when ExitNodes is not set.
2015-02-18 12:51:07 +00:00
Yawning Angel
cbd26157c5
Remove tor_strclear(), and replace previous calls with memwipe().
2015-02-17 18:53:33 +00:00
Nick Mathewson
d038430a14
Merge branch 'bug14918'
2015-02-17 12:49:29 -05:00
Nick Mathewson
9bf6da1861
Merge remote-tracking branch 'public/feature_13822'
2015-02-17 12:34:13 -05:00
Nick Mathewson
8eb3d81e6e
Fix some issues with reporting exit-free networks
...
Fixes bug 14918.
2015-02-17 12:07:24 -05:00
George Kadianakis
6517219093
Control: command to lookup cached HS descriptor
...
This adds the key "hs/client/desc/id/<ADDR>" to the GETINFO command used to
lookup the given onion address in the client hs descriptor cache.
If found, prints it formatted as specified in section 1.3 of rend-spec.txt.
Fixes #14845
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-02-17 11:30:25 -05:00
Nick Mathewson
0b46b08225
Check thread count for negative; realloc->reallocarray
...
CID 1268069
2015-02-17 08:46:11 -05:00
Nick Mathewson
7620c613e8
Have tinytest tolerate systems where char has > 8 bytes
...
CID 1064418
2015-02-17 08:40:55 -05:00
Nick Mathewson
c3813e2e64
Use --list-fingerprint instead of process control in zero_length_keys.sh
...
Using kill and wait in this way may have been making windows
builders unhappy.
2015-02-17 08:30:32 -05:00
Nick Mathewson
8375663adf
Wrap two long lines
2015-02-17 08:30:28 -05:00
Roger Dingledine
d6dbd55849
trivial whitespace fix
2015-02-17 06:01:33 -05:00
Nick Mathewson
0b3ae7d9e5
Maybe this will make coverity not care that this check is dead. CID 1268063
2015-02-16 15:44:18 -05:00
Nick Mathewson
2fe139473d
No, coverity, this is not a memory leak. 1268065
2015-02-16 15:42:48 -05:00
Nick Mathewson
5d2a23397a
Fix a few coverity "Use after NULL check" warnings
...
Also remove the unit test mocks that allowed get_options() to be
NULL; that's an invariant violation for get_options().
2015-02-16 15:40:15 -05:00
Nick Mathewson
7117959199
Fix deadcode warning in get_interface_addresses_raw().
...
CID 1268070
2015-02-16 15:28:36 -05:00
Nick Mathewson
2af7bc5b46
Fix a trivial double-close in address.c. CID 1268071
2015-02-16 15:24:13 -05:00
Sina Rabbani
8e61d38cf1
Faravahar's New IP Address as of 2/20/2015
2015-02-16 11:51:36 -05:00
Sebastian Hahn
0c11d8b2d2
Implement status/fresh-relay-descs command
...
The idea here is that a controller should be able to make Tor produce a
new relay descriptor on demand, without that descriptor actually being
uploaded to the dirauths (they would likely reject it anyway due to
freshness concerns).
Implements #14784 .
2015-02-15 12:36:07 +01:00
Sebastian Hahn
8feaf3846d
Refactor router_rebuild_descriptor
...
Allow building a router descriptor without storing it to global state.
This is in preparation of a patch to export the created descriptors via
the control port.
2015-02-15 12:33:20 +01:00
Sebastian Hahn
3bcdb26267
Call cpu_init if we change to being a relay
...
The issue is that we use the cpuworker system with relays only, so if we
start up as a client and transition to being a relay later, we'll be
sad.
This fixes bug 14901; not in any released version of Tor.
2015-02-15 11:49:19 +01:00
Sebastian Hahn
424edd5710
Don't leak a cond var when starting threads in a pool
2015-02-15 11:21:54 +01:00
Nick Mathewson
5644d92dd7
Merge remote-tracking branch 'sebastian/bug14875'
2015-02-12 14:50:13 -05:00
Sebastian Hahn
c8ce973dc7
Avoid undefined behaviour in ifreq_to_smartlist
...
This could trigger where _SIZEOF_ADDR_IFREQ() might not return a
multiple of sizeof(void *). Fixes bug 14875; not in any released version
of Tor.
2015-02-12 14:56:47 +01:00
Sebastian Hahn
87a95b0236
Actually get all interface addresses
...
If we guessed a buffer size too small, we never increased the buffer and
tried again
Also simplify the interface of ifreq_to_smartlist a little
2015-02-12 14:54:39 +01:00
Nick Mathewson
f794a09164
Merge branch 'bug14478_squashed'
2015-02-11 15:59:41 -05:00
Sebastian Hahn
dfb409b8b0
Put error messages to stderr
...
Thanks weasel :)
Also remove stray debug output
2015-02-11 15:59:34 -05:00
Sebastian Hahn
c5f176b9b0
Change exit code of zero_length_keys script
...
Weasel notes that exit codes above 128 are for when a script dies from a
signal.
2015-02-11 15:59:34 -05:00
Sebastian Hahn
6ecd6e27da
Avoid undefined behaviour of test
...
Fixes part of bug #14478 , patch idea suggested by an anonymous
contributor. Thanks!
2015-02-11 15:59:34 -05:00
Sebastian Hahn
0a0c5d7c0e
Check that mktemp result is a directory
...
Fixes part of bug #14478 , patch idea suggested by an anonymous
contributor. Thanks!
2015-02-11 15:59:34 -05:00
Sebastian Hahn
f84a54c159
Clean up after zero length key test
2015-02-11 15:59:34 -05:00
Nick Mathewson
99e915dbfe
Merge remote-tracking branch 'public/bug14759'
2015-02-11 15:15:24 -05:00
Nick Mathewson
b223b7c22d
fix a compilation warning
2015-02-11 15:10:35 -05:00
Nick Mathewson
d7a1e83f50
Merge remote-tracking branch 'public/remove_freelist'
2015-02-11 15:09:01 -05:00
Nick Mathewson
caf28519d9
Merge branch 'bug12844'
...
Conflicts:
src/or/circuituse.c
src/test/include.am
src/test/test_entrynodes.c
2015-02-11 15:06:04 -05:00
Nick Mathewson
0899f51bc6
Additional paranoia: do not even build tor2web stuff if not using.
...
(That is, don't build it unless we're building for tor2web, or we
are building for tests.)
2015-02-11 14:54:16 -05:00
Nick Mathewson
f5f6d13e4c
Fix crash on glibc __libc_message()
...
__libc_message() tries to open /dev/tty with O_RDWR, but the sandbox
catches that and calls it a crash. Instead, I'm making the sandbox
setenv LIBC_FATAL_STDERR_, so that glibc uses stderr instead.
Fix for 14759, bugfix on 0.2.5.1-alpha
2015-02-11 09:46:29 -05:00
Nick Mathewson
6f331645c7
Remove mempools and buf freelists
...
They have been off-by-default since 0.2.5 and nobody has complained. :)
Also remove the buf_shrink() function, which hasn't done anything
since we first stopped using contiguous memory to store buffers.
Closes ticket 14848.
2015-02-11 09:03:50 -05:00
Nick Mathewson
0c81dfa848
Merge remote-tracking branch 'public/feature_13555'
2015-02-11 08:42:00 -05:00
Nick Mathewson
5c820def99
Merge remote-tracking branch 'sysrqb/bug14802_025'
2015-02-09 22:39:55 -08:00
Nick Mathewson
f4c0735933
Merge remote-tracking branch 'teor/avoid-NULL-smartlist-foreach'
2015-02-09 22:35:40 -08:00
Sebastian Hahn
9667b2b88a
Add some comments to or_circuit_t.workqueue_entry
...
These were suggested by dgoulet, thanks!
2015-02-09 16:13:08 +01:00
Sebastian Hahn
7337510090
Avoid use-after-free of circ belonging to cancelled job
...
This fixes a bug where we decide to free the circuit because it isn't on
any workqueue anymore, and then the job finishes and the circuit gets
freed again.
Fixes bug #14815 , not in any released version of Tor.
2015-02-09 16:12:47 +01:00
Roger Dingledine
56061976db
Recover better when our clock jumps back many hours
...
like might happen for Tails or Whonix users who start with a very wrong
hardware clock, use Tor to discover a more accurate time, and then
fix their clock.
Resolves part of ticket 8766.
(There are still some timers in various places that aren't addressed yet.)
2015-02-09 01:05:31 -05:00
Damian Johnson
44abbf5ab6
Dropping test_cmdline_args.py
...
Before a couple weeks ago didn't know Tor had these tests, interesting! Stem
already has tests for spawning tor processes but lacked any with this targeted
focus on its arguments.
I've added our own counterpart for these tests. Many are direct copies but
there were others I improved a little...
https://trac.torproject.org/projects/tor/ticket/14109
https://gitweb.torproject.org/stem.git/commit/?id=137d193a026638f066e817e3396cebbbb6ace012
Now that Tor uses Stem to supplement its tests no reason for these to live
separately. Tested by simply building tor and confirming test_cmdline_args.py
is no longer in the generated Makefile.
2015-02-08 21:34:36 -08:00
Roger Dingledine
1cb9064d7d
shift all the static times into a struct
...
no actual behavior changes yet
2015-02-09 00:07:15 -05:00
Sebastian Hahn
37d16c3cc7
Reserve enough space for rend_service_port_config_t
...
In #14803 , Damian noticed that his Tor sometimes segfaults. Roger noted
that his valgrind gave an invalid write of size one here. Whenever we
use FLEXIBLE_ARRAY_MEMBER, we have to make sure to actually malloc a
thing that's large enough.
Fixes bug #14803 , not in any released version of Tor.
2015-02-09 04:48:16 +01:00
Matthew Finkel
9ae321db66
Return 0 when detecting the amount of memory fails
...
Fixes bug 14802; bugfix on 0.2.5.4-alpha.
2015-02-09 02:06:18 +00:00
teor
d0759da14e
Avoid calling SMARTLIST_FOREACH on a NULL smartlist in tests
...
Check if each smartlist is NULL before calling SMARTLIST_FOREACH on it.
Bug discovered by the clang static analyzer.
Apple clang 600.0.56 (LLVM 3.5svn) on x86_64-apple-darwin14.1.0.
2015-02-08 23:41:37 +11:00
Nick Mathewson
8b82f6261e
Search-and-replace to regain coding style in wake of 13822.
...
(all-caps should be reserved for global or module-global constants and
2015-02-07 08:33:36 -05:00
Nick Mathewson
4beb830953
Split ROUTER_REQUIRED_MIN_BANDWIDTH into RELAY_ and BRIDGE_ variants
...
Also raise those minima from 20 to 75 and 50 respectively.
Closes ticket 13822.
2015-02-07 08:33:23 -05:00
David Goulet
b101f4e98c
Control: getinfo entry-guards report down-since
...
If the guard unreachable_since variable was set, the status "up" was
reported which is wrong. This adds the "down" status followed by the
unreachable_since time value.
Fixes #14184
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-02-06 16:06:20 -05:00
Sebastian Hahn
136b1d8ed0
Remove useless export in zero length key test
...
Fixes part of bug #14478 , patch idea suggested by an anonymous
contributor. Thanks!
2015-02-06 21:56:26 +01:00
Sebastian Hahn
d695f7b423
Don't use invalid exit values in zero length key test
...
Shell exit values must fall into the range of [0-255], so let's honour
this. In practice, the "exit -1" from the old code set an exit value of
255 on most systems, so let's pick that.
Fixes part of bug #14478 , patch idea suggested by an anonymous
contributor. Thanks!
2015-02-06 21:55:59 +01:00
Nick Mathewson
e36faeec1d
Merge remote-tracking branch 'sebastian/bug13993'
2015-02-06 15:42:53 -05:00
Sebastian Hahn
e0c3de40ad
Fix check-spaces complaints
2015-02-06 21:36:40 +01:00
Sebastian Hahn
6d8b614729
Avoid logging startup messages twice
2015-02-06 21:34:21 +01:00
Sebastian Hahn
b3bc871214
Add unit test for #13290
2015-02-06 21:04:05 +01:00
Yawning Angel
16cf1679e7
Fix scheduler compilation on targets where char is unsigned.
...
Per discussion with nickm, the `dir` argument should be a int rather
than a signed char.
Fixes bug #14764 .
2015-02-06 16:26:28 +00:00
Nick Mathewson
1799c2be09
Merge remote-tracking branch 'public/bug13796'
2015-02-05 22:53:15 -05:00
Nick Mathewson
2274221557
Fix a work-counting bug introduced by the workqueue merge
...
David Goulet finds that when he runs a busy relay for a while with the
latest version of the git code, the number of onionskins handled
slowly dwindles to zero, with total_pending_tasks wedged at its
maximum value.
I conjecture this is because the total_pending_tasks variable isn't
decremented when we successfully cancel a job. Fixed that.
Fixes bug 14741; bugfix not on any released version of tor.
2015-02-05 12:17:08 -05:00
Nick Mathewson
3f993dacc1
use ARRAY_LENGTH macro in domain_to_string
2015-02-05 11:01:13 -05:00
Yawning Angel
b330bdec8e
Add a string representation for LD_SCHED, and a extra sanity check.
...
This both fixes the problem, and ensures that forgetting to update
domain_list in the future will trigger the bug codepath instead of
a NULL pointer deref.
2015-02-05 15:46:27 +00:00
Nick Mathewson
daab405168
Bump the minimum relay version to 0.2.4.18-rc
...
Closes #13555
2015-02-04 13:27:56 -05:00
Nick Mathewson
a8835170d7
Use getsockname, not getsockopt, on TPROXY sockets
2015-02-04 10:09:54 -05:00
Nick Mathewson
ac8f235446
fix a unit tests memory leak (my fault)
2015-02-03 15:58:48 -05:00
Nick Mathewson
5be48c5d4c
Work around test_status.c weirdness
...
Ordinarily, get_options() can never return NULL, but with
test_status.c mocking, it can. So test for that case.
The best fix here would be to pass the options value to a
bridge_server_mode() function.
2015-02-03 15:50:31 -05:00
Nick Mathewson
cdc49629c7
Merge branch 'bug6852'
...
Conflicts:
src/or/status.c
2015-02-03 13:06:58 -05:00
Nick Mathewson
7f52dc4d03
Choose a more deliberate cutoff for clients in heartbeat
2015-02-03 13:02:22 -05:00
Nick Mathewson
d03e1da232
Merge remote-tracking branch 'public/bug9635_warnings_025'
...
Conflicts:
src/test/test.c
2015-02-02 16:31:32 -05:00
Nick Mathewson
41ba4f5627
tweak based on comments from dgoulet
2015-02-02 14:42:33 -05:00
rl1987
a9caeb961f
Test for 13865.
2015-02-02 14:38:36 -05:00
Nick Mathewson
5c807f30e4
Add more parenthesis to the definition of ARRAY_LENGTH
2015-02-02 14:14:35 -05:00
Nick Mathewson
03563f4723
Fix an unused-variable warning.
2015-02-02 13:35:44 -05:00
Nick Mathewson
79c7625e38
Merge branch 'feature13864_squashed'
2015-02-02 13:32:53 -05:00
rl1987
fe328d192e
Allow reading torrc from stdin.
2015-02-02 13:31:56 -05:00
Nick Mathewson
69deab8b2a
Merge remote-tracking branch 'public/bug13319'
2015-02-02 10:25:25 -05:00
Nick Mathewson
f4b79bc420
Merge remote-tracking branch 'sysrqb/bug14216_bad_since'
2015-02-02 10:23:52 -05:00
Nick Mathewson
55639bc67f
Merge remote-tracking branch 'dgoulet/bug14202_026_v1'
2015-02-02 10:16:48 -05:00
Nick Mathewson
e78b7e2776
Merge remote-tracking branch 'public/14188_part1'
2015-02-02 10:15:26 -05:00
Matthew Finkel
4cb59ceb8e
Only retry connecting to configured bridges
...
After connectivity problems, only try connecting to bridges which
are currently configured; don't mark bridges which we previously
used but are no longer configured. Fixes 14216. Reported by
and fix provided by arma.
2015-01-31 09:46:18 +00:00
Nick Mathewson
aba90b2125
Merge remote-tracking branch 'dgoulet/bug14554_026_v1'
2015-01-30 15:29:59 -05:00
David Goulet
2c41f12048
Fix: check r < 0 before checking errno
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30 15:18:40 -05:00
David Goulet
51f793e37e
Fix possible infinite loop on pipe/sock_drain()
...
If the returned value of read/recv is 0 (meaning EOF), we'll end up in an
infinite loop (active wait) until something is written on the pipe which is
not really what we want here especially because those functions are called
from the main thread.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30 15:05:18 -05:00
Nick Mathewson
097286e476
Fix some unused-argument warnings
2015-01-30 14:47:56 -05:00
Nick Mathewson
bc9ade055e
Fix an uninitialized-variable warning.
2015-01-30 14:46:18 -05:00
David Goulet
44e9dafb67
Fix: test -ENOENT after config_parse_unix_port()
...
Check for -ENOENT instead of ENOENT after the HS port is parsed.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-30 14:13:27 -05:00
Nick Mathewson
fac8d40886
Merge remote-tracking branch 'public/prop227_v2'
...
Conflicts:
src/test/test_dir.c
2015-01-30 07:36:55 -05:00
Nick Mathewson
d1e52d9a2a
Correctly handle OutboundBindAddress again.
...
ca5ba2956b
broke this; bug not in any
released Tor.
Also fix a typo.
Fixes 14541 and 14527. Reported by qbi.
2015-01-30 07:29:23 -05:00
Nick Mathewson
a87ea9b1c6
Merge branch 'bug14451_026_v1'
2015-01-29 15:16:15 -05:00
Nick Mathewson
f6afb04abb
Use HT_BUCKET_NUM_ in more places
...
(patch from sysrqb)
2015-01-29 15:10:23 -05:00
Nick Mathewson
5faa017b86
Merge remote-tracking branch 'public/ticket11737'
2015-01-29 15:09:55 -05:00
Nick Mathewson
4c1a779539
Restrict unix: addresses to control and socks for now
2015-01-29 14:51:59 -05:00
Nick Mathewson
204374f7d9
Remove SocksSocket; it's now spelled differently thanks to 14451
...
Also, revise bug12585 changes file to mention new syntax
2015-01-29 14:46:20 -05:00
Nick Mathewson
b4a8fd8958
When there are no package lines, make consensus/packages say "".
...
Also, give a better error message when there is no consensus.
2015-01-29 14:14:59 -05:00
Nick Mathewson
bd630a899a
Correctly reject packages lines with empty entries
2015-01-29 14:09:57 -05:00
Nick Mathewson
f935ee2dae
Define 'digesttype' correctly
2015-01-29 14:04:21 -05:00
David Goulet
80bed1ac96
Remove obsolete workaround in dirserv_thinks_router_is_hs_dir()
...
Fixes #14202
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-29 12:55:19 -05:00
David Goulet
ebc59092bc
Make hidden service use the config unix prefix
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-28 18:01:53 -05:00
David Goulet
bf3fb55c47
Support unix: prefix in port configuration
...
It's now possible to use SocksPort or any other kind of port that can use a
Unix socket like so:
SocksPort unix:/foo/bar/unix.sock
Fixes #14451
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-28 17:55:38 -05:00
Nick Mathewson
a3de2dfde6
Merge branch 'bug11485_026_v2_squashed'
2015-01-28 14:32:19 -05:00
David Goulet
fb523b543a
fixup! Refactor the use of ifdef HAVE_SYS_UN_H
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-28 14:30:23 -05:00
Andrea Shepard
bce824a9ad
Actually make connections to HSes on AF_UNIX sockets
2015-01-28 14:30:23 -05:00
Andrea Shepard
ca5ba2956b
Support connection_exit_connect() to AF_UNIX sockets
2015-01-28 14:30:23 -05:00
Andrea Shepard
6564291601
Handle config options for AF_UNIX hidden services rendservice.c
2015-01-28 14:30:23 -05:00
Arthur Edelstein
cb714d896c
Bug #8405 : Report SOCKS username/password in CIRC status events
...
Introduces two new circuit status name-value parameters: SOCKS_USERNAME
and SOCKS_PASSWORD. Values are enclosing in quotes and unusual characters
are escaped.
Example:
650 CIRC 5 EXTENDED [...] SOCKS_USERNAME="my_username" SOCKS_PASSWORD="my_password"
2015-01-28 12:02:15 -05:00
Nick Mathewson
32dad3b83b
Add GETINFO consensus/{valid-{after,until},fresh-until}
2015-01-28 11:28:21 -05:00
Nick Mathewson
c240eea0df
more typo fixes from mcs and gk
2015-01-28 11:25:37 -05:00
Nick Mathewson
f75ca04520
Tweak tor-resolve docs and logs
...
Resolves 14325
2015-01-28 10:11:08 -05:00
Nick Mathewson
e9caa8645e
Try to work around changes in openssl 1.1.0
...
Prefer not to use a couple of deprecated functions; include more
headers in tortls.c
This is part of ticket 14188.
2015-01-28 10:00:58 -05:00
Nick Mathewson
20d0b1a04e
Bump a client authorization message from debug to info.
...
A user wants this for 14015, and it seems fairly reasonable.
2015-01-28 09:42:28 -05:00
Nick Mathewson
9c4328c038
New GETINFO consensus/packages to expose package information from consensus
2015-01-27 16:40:32 -05:00
Nick Mathewson
1e61b45251
Fixes on prop227 comments, based on comments by mcs on #10395
2015-01-27 16:31:48 -05:00
David Goulet
91009dce97
Refactor rend_cache_lookup_entry() and how it's used
...
Here is why:
1) v0 descriptors are deprecated since 0.2.2.1 and not suppose to be alive
in the network anymore. This function should only serve v2 version for now
as the default.
2) It should return different error code depending on what's the actual
error is. Right now, there is no distinction between a cache entry not found
and an invalid query.
3) This function should NOT test if the intro points are usable or not. This
adds some load on a function that should be "O(1)" and do one job.
Furthermore, multiple callsites actually already test that doing twice the
job...
4) While adding control event, it would be useful to be able to lookup a
cache entry without having it checking the intro points. There are also
places in the code that do want to lookup the cache entry without doing
that.
Fixes #14391
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-27 12:04:40 -05:00
Andrea Shepard
03d6a31716
Groundwork for AF_UNIX hidden services in rendservice.c
2015-01-27 06:22:37 +00:00
Nick Mathewson
a598d0f575
Bail early in cpuworker_onion_handshake_replyfn if the circuit is marked
2015-01-26 10:19:07 -05:00
Nick Mathewson
8f9fb3e8fa
Try to fix some more memory leaks in the unit tests
2015-01-23 11:35:05 -05:00
Nick Mathewson
614fbf1812
Fix some memory leaks in new address tests
2015-01-23 11:26:40 -05:00
Nick Mathewson
034e2788f8
whitespace fixes
2015-01-23 11:18:28 -05:00
Nick Mathewson
7322de15dc
Split the slow unit tests into their own binary
...
This can run in parallel with the faster ones and the other tests.
2015-01-23 11:15:53 -05:00
Nick Mathewson
420037dcef
Merge branch 'if_addr_refactoring_squashed'
...
Conflicts:
src/test/include.am
src/test/test.c
2015-01-23 10:13:37 -05:00
rl1987
3966145dff
Refactor code that looks up addresses from interfaces
...
Now the code has separate implementation and examination functions,
uses smartlists sanely, and has relatively decent test coverage.
2015-01-23 10:07:17 -05:00
Nick Mathewson
6c443e987d
Tweak the 9969 fix a little
...
If we have busy nodes and excluded nodes, then don't retry with the
excluded ones enabled. Instead, wait for the busy ones to be nonbusy.
2015-01-23 09:37:08 -05:00
Nick Mathewson
5d4bb6f61f
Merge remote-tracking branch 'public/ticket9969'
...
Conflicts:
src/or/directory.c
src/or/routerlist.c
src/or/routerlist.h
src/test/include.am
src/test/test.c
2015-01-23 09:36:00 -05:00
Nick Mathewson
b677ccd3ab
Merge remote-tracking branch 'public/ticket13762'
2015-01-23 08:55:31 -05:00
Nick Mathewson
d8517fe843
Merge remote-tracking branch 'origin/maint-0.2.5'
2015-01-23 08:53:21 -05:00
Nick Mathewson
7cbdec578b
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
2015-01-23 08:52:55 -05:00
Nick Mathewson
df4c484021
Merge remote-tracking branch 'karsten/geoip6-jan2015' into maint-0.2.4
2015-01-23 08:52:35 -05:00
Nick Mathewson
dbd5a9a8f9
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2015-01-23 08:52:20 -05:00
Nick Mathewson
4a6b43bf76
fix some warnings in compat_threads.c
2015-01-22 14:22:39 -05:00
Nick Mathewson
1fb9979eb8
Move a redundant _GNU_SOURCE to where it is not redundant
2015-01-22 14:18:10 -05:00
Karsten Loesing
a9ce0cd659
Update geoip6 to the January 7 2015 database.
2015-01-22 09:58:29 +01:00
Karsten Loesing
c3f8f5ab0e
Update geoip to the January 7 2015 database.
2015-01-22 09:56:54 +01:00
Nick Mathewson
38b3f9a619
use the correct free fn. spotted by dgoulet
2015-01-21 14:54:38 -05:00
Nick Mathewson
23fc1691b6
Merge branch 'better_workqueue_v3_squashed'
2015-01-21 14:47:16 -05:00
David Goulet
84f5cb749d
Fix: remove whitespace and update a comment in cpuworker.c
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:31:02 -05:00
David Goulet
f52ac5be74
Fix: change copyright year in workqueue and thread tests
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:31:02 -05:00
David Goulet
d684dbb0c7
Support monotonic time for pthread_cond_timedwait
...
This is to avoid that the pthread_cond_timedwait() is not affected by time
adjustment which could make the waiting period very long or very short which
is not what we want in any cases.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-21 14:29:12 -05:00
Nick Mathewson
f0415c1600
Merge branch 'bug9819'
2015-01-21 13:00:26 -05:00
Nick Mathewson
523e920d53
fix a comment
2015-01-21 13:00:14 -05:00
Nick Mathewson
3c8dabf69a
Fix up some workqueue/threading issues spotted by dgoulet.
2015-01-21 12:26:41 -05:00
Nick Mathewson
ac5b70c700
handle EINTR in compat_*threads.c
2015-01-21 12:18:11 -05:00
Nick Mathewson
e7e33d4b04
Merge branch 'bug14084'
2015-01-20 14:07:37 -05:00
Nick Mathewson
9ddc1fb10c
Merge remote-tracking branch 'dgoulet/bug14224_025_v1'
2015-01-20 14:02:07 -05:00
Nick Mathewson
da423532f7
Merge branch 'ticket14254_squashed'
2015-01-20 13:46:56 -05:00
Nick Mathewson
78c53eff85
Fix SocksSocket 0. That was easy!
2015-01-20 13:46:44 -05:00