Nick Mathewson
7ce767181f
Have eventdns set the "truncated" bit correctly.
...
Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor
we never generate large DNS replies.
2009-06-30 10:05:42 -04:00
Nick Mathewson
f466f3d12c
Merge commit 'sebastian/geoipnotice'
2009-06-25 12:09:57 -04:00
Sebastian Hahn
38476e2555
Log a notice about collecting geoip stats
2009-06-25 18:06:52 +02:00
Roger Dingledine
9fc3d87827
stop capping bandwidths we see in the consensus
...
but continue capping bandwidths we see in local server
descriptors, if we have no consensus weights for them.
2009-06-25 11:38:05 -04:00
Nick Mathewson
d2cac1afc3
Merge commit 'origin/maint-0.2.1'
2009-06-24 19:02:00 -04:00
Marcus Griep
d308738919
Ignore control port commands after a QUIT
...
When a QUIT has been issued on a control port connection, then
ignore further commands on that port. This fixes bug 1016.
2009-06-24 00:10:22 -04:00
Marcus Griep
fa89c9f086
Flush long replies over control port on QUIT
...
Marks the control port connection for flushing before closing when
the QUIT command is issued. This allows a QUIT to be issued during
a long reply over the control port, flushing the reply and then
closing the connection. Fixes bug 1015.
2009-06-24 00:10:20 -04:00
Nick Mathewson
39551b494e
Merge commit 'origin/maint-0.2.1'
2009-06-22 14:08:19 -04:00
Roger Dingledine
1aaab8288d
Clients now use bandwidth values in the consensus
...
rather than the bandwidth values in each relay descriptor. This approach
opens the door to more accurate bandwidth estimates once the directory
authorities start doing active measurements. Implements more of proposal
141.
2009-06-22 14:01:34 -04:00
Nick Mathewson
3f4f6f9075
Merge commit 'origin/maint-0.2.1'
...
Conflicts:
ChangeLog
2009-06-22 12:36:06 -04:00
Nick Mathewson
262455527a
Serve DirPortFrontPage even if the write bucket is low.
...
arma's rationale: "I think this is a bug, since people intentionally
set DirPortFrontPage, so they really do want their relay to serve that
page when it's asked for. Having it appear only sometimes (or roughly
never in Sebastian's case) makes it way less useful."
Fixes bug 1013; bugfix on 0.2.1.8-alpha.
2009-06-22 12:34:32 -04:00
Karsten Loesing
e6a1e7001b
Add warning that the results of --enable-geoip-stats are different from those in master.
2009-06-22 11:51:19 -04:00
Nick Mathewson
da416d9884
Bump version to 0.2.1.16-rc.dev
2009-06-20 21:54:56 -04:00
Nick Mathewson
ac3dedacce
Bump version to 0.2.1.16-rc
2009-06-20 01:14:07 -04:00
Nick Mathewson
659fc13da5
Change proxy-address type to tor_addr_t to allow ipv6 proxies.
2009-06-19 12:48:00 -04:00
Nick Mathewson
015189b5df
Move SOCKS reason-decoding switches into reasons.c
2009-06-19 12:40:23 -04:00
Christopher Davis
75472c19c3
Enable Tor to connect through SOCKS 4/5 proxies
...
Added a sanity check in config.c and a check in directory.c
directory_initiate_command_rend() to catch any direct connection attempts
when a socks proxy is configured.
2009-06-19 12:16:15 -04:00
Karsten Loesing
f266ecbeec
Better fix for 997.
2009-06-19 16:26:02 +02:00
Karsten Loesing
20883f5e83
Revert "Backport fix for bug 997."
...
This reverts commit 3847f54945
.
2009-06-19 15:46:13 +02:00
Nick Mathewson
aa88c8d91a
Merge commit 'origin/maint-0.2.1'
2009-06-18 11:10:27 -04:00
Nick Mathewson
298dc95dfd
tor-resolve: Don't automatically refuse .onion addresses.
...
If the Tor is running with AutomapHostsOnResolve set, it _is_
reasonable to do a DNS lookup on a .onion address. So instead we make
tor-resolve willing to try to resolve anything. Only if Tor refuses
to resolve it do we suggest to the user that resolving a .onion
address may not work.
Fix for bug 1005.
2009-06-18 11:08:10 -04:00
Nick Mathewson
94e8c34cb7
Set EV_PERSIST flag on signal events with Libevent < 2.0.
...
Fix for bug 1007.
2009-06-18 10:07:26 -04:00
Nick Mathewson
df03d6eca8
Merge commit 'karsten/bug997-hidservfetch'
2009-06-16 16:26:02 -04:00
Karsten Loesing
3847f54945
Backport fix for bug 997.
...
Backporting 6a32beb
and ca8708a
.
2009-06-16 16:25:35 -04:00
Nick Mathewson
0d2976d64b
Merge commit 'origin/maint-0.2.1'
2009-06-16 16:18:16 -04:00
Nick Mathewson
7f8a6c5e92
Revise earlier check for correct IPv4 addr length to check for ==4.
...
We need this to match the check in connection_ap_handshake_socks_resolved().
Found by optimist.
2009-06-16 16:12:06 -04:00
Sebastian Hahn
0caf8dd0b6
Fix bug 1001
...
For compatibility with Libevent2, tor_event_new should accept
a NULL base without crashing.
2009-06-16 17:30:08 +02:00
Karsten Loesing
ca8708a9ce
Fix more of bug 997.
...
Fix refetching of hidden service descriptors when all introduction points
have turned out to not work.
2009-06-13 12:21:58 +02:00
Nick Mathewson
74bf885b2d
Whitespace and osx fixes on libevent2 patch.
2009-06-12 15:09:09 -04:00
Nick Mathewson
1e709c79d1
Isolate Libevent API dependency to just main.c and dns.c in src/or.
...
The rest of the code was only including event.h so that it could see
EV_READ and EV_WRITE, which we were using as part of the
connection_watch_events interface for no very good reason.
2009-06-12 14:27:53 -04:00
Nick Mathewson
33b1d714e7
Make Tor compile with Libevent 1.0 again.
2009-06-12 14:27:53 -04:00
Nick Mathewson
c0af3cdfb6
Move the Libvent setup logic into compat_libevent from config.
...
This has been some pretty ugly and voodoo-laden code. I've tried to
clean it up a bit, but more work probably remains.
2009-06-12 14:27:52 -04:00
Nick Mathewson
e5b88dc83f
Update Tor to use Libevent 2.0 APIs when available.
...
This patch adds a new compat_libevent.[ch] set of files, and moves our
Libevent compatibility and utilitity functions there. We build them
into a separate .a so that nothing else in src/commmon depends on
Libevent (partially fixing bug 507).
Also, do not use our own built-in evdns copy when we have Libevent
2.0, whose evdns is finally good enough (thus fixing Bug 920).
2009-06-12 14:27:52 -04:00
Roger Dingledine
845326317d
Check answer_len in the remap_addr case of process_relay_cell_not_open.
...
Fix an edge case where a malicious exit relay could convince a
controller that the client's DNS question resolves to an internal IP
address. Bug found and fixed by "optimist"; bugfix on 0.1.2.8-beta.
2009-06-12 11:22:54 -04:00
Roger Dingledine
cb1617f18e
Check answer_len in the remap_addr case of process_relay_cell_not_open.
...
Fix an edge case where a malicious exit relay could convince a
controller that the client's DNS question resolves to an internal IP
address. Bug found and fixed by "optimist"; bugfix on 0.1.2.8-beta.
2009-06-12 11:18:02 -04:00
Karsten Loesing
6a32beb877
Apply fix for bug 997.
...
Hidden service clients didn't use a cached service descriptor that
was older than 15 minutes, but wouldn't fetch a new one either. Now,
use a cached descriptor no matter how old it is and only fetch a new
one when all introduction points fail. Fix for bug 997. Patch from
Marcus Griep.
2009-06-12 11:39:35 +02:00
Karsten Loesing
77f5ad6b07
Restore changes from f79688d
that got lost somehow during a merge.
2009-06-12 02:05:21 +02:00
Nick Mathewson
358efe1eea
Merge commit 'origin/maint-0.2.1'
2009-06-08 00:01:31 -04:00
Nick Mathewson
20193fc7ab
Avoid a memory corruption problem related to "private" in DirPolicy.
...
This is a posible fix for bug 996.
2009-06-05 19:41:40 -04:00
Nick Mathewson
4945fee65a
Merge commit 'origin/maint-0.2.1'
2009-06-04 03:31:12 -04:00
Karsten Loesing
48bf1d97ee
Update the rest of the geoip file.
2009-06-04 00:47:58 +02:00
Nick Mathewson
0b23035e43
Update the geoip file
2009-06-03 17:35:41 -04:00
Nick Mathewson
b262e76563
Fix gprof bottlenecks on exit nodes found by Jacob.
...
Apparently all the stuff that does a linear scan over all the DNS
cache entries can get really expensive when your DNS cache is very
large. It's hard to say how much this will help performance, since
gprof doesn't count time spent in OpenSSL or zlib, but I'd guess 10%.
Also, this patch removes calls to assert_connection_ok() from inside
the read and write callbacks, which are similarly unneeded, and a
little costlier than I'm happy with.
This is probably worth backporting to 0.2.0.
2009-06-03 13:52:03 -04:00
Nick Mathewson
77ffd6b2a7
Merge commit 'origin/maint-0.2.1'
2009-05-31 19:17:22 -04:00
Nick Mathewson
c4c7dcd453
Do not report a node as a "chosen exit" when it is not in fact an exit.
...
Provide a useful warning when launch_circuit tries to make us use a
node we don't want to use. Just give an info message when this is a
normal and okay situation. Fix for logging issues in bug 984.
2009-05-31 19:15:36 -04:00
Nick Mathewson
e8ac2a8477
Make the second argument to routerset_contains_extendinfo const
2009-05-31 19:15:36 -04:00
Nick Mathewson
e84ddead34
Merge branch 'hardware_accel_improvements'
2009-05-31 13:36:50 -04:00
Nick Mathewson
3ca10bb62f
Fix-ups for dynamic OpenSSL engine patch.
...
Include a changelog, and don't try to compare strings with !=.
2009-05-31 13:36:18 -04:00
Nick Mathewson
fd992deeea
Don't attempt to log messages to a controller from a worker thread.
...
This patch adds a function to determine whether we're in the main
thread, and changes control_event_logmsg() to return immediately if
we're in a subthread. This is necessary because otherwise we will
call connection_write_to_buf, which modifies non-locked data
structures.
Bugfix on 0.2.0.x; fix for at least one of the things currently
called "bug 977".
2009-05-30 18:16:24 -04:00
Karsten Loesing
dfebc88d56
Warn and exit when we are configured to measure GeoIP statistics, but have no GeoIP database.
2009-05-30 23:35:21 +02:00
Nick Mathewson
d66c379765
Clean up a bit of C logic, and fix an erroneous warning.
...
(Simplify "if (cond) return 1; return 0;" to "return cond;", and don't
give a warning when we start with accounting on but dirport off.)
2009-05-29 23:28:01 -04:00
Sebastian Hahn
e70fe116d3
Consider *ListenAddress when warning about low ports and hibernation
...
Tas (thanks!) noticed that when *ListenAddress is set, Tor would
still warn on startup when *Port is low and hibernation is active.
The patch parses all the *ListenAddress lines, and checks the
ports. Bugfix on 0.2.1.15-rc
2009-05-30 03:09:39 +02:00
Nick Mathewson
3599e9051e
Restore changes from Karsten's "Remove unused rendversion parameters".
...
These were made undone by a merge.
2009-05-28 16:19:05 -04:00
Nick Mathewson
4913a8c4ba
Merge commit 'origin/maint-0.2.1'
2009-05-28 16:07:49 -04:00
Nick Mathewson
873faffb5a
Two more spelling fix fixes.
2009-05-28 12:26:17 -04:00
Nick Mathewson
260de44313
Fixes to spelling fixes. Thanks, Roger!
2009-05-28 12:22:48 -04:00
Nick Mathewson
cb18fc2190
Merge commit 'origin/maint-0.2.1'
2009-05-27 18:12:18 -04:00
Karsten Loesing
d49711e52c
Fix unit tests that were broken after last fix of #932 .
...
With the last fix of task 932 (5f03d6c
), client requests are only added to
the history when they happen after the start of the current history. This
conflicts with the unit tests that insert current requests first (defining
the start of the client request history) followed by requests in the past.
The fix is to insert requests in chronological order in the unit tests.
2009-05-27 18:04:55 -04:00
Nick Mathewson
ec7e054668
Spell-check Tor.
2009-05-27 17:55:51 -04:00
Nick Mathewson
f0453c45c8
Spelling fixes in comments and strings
2009-05-27 16:36:13 -04:00
Nick Mathewson
0e2618dd54
Merge commit 'origin/maint-0.2.1'
2009-05-27 14:20:18 -04:00
Nick Mathewson
181674e9bb
Fix a signed/unsigned comparison warning
2009-05-27 14:19:24 -04:00
Karsten Loesing
54c97c9133
Change the way how directories that are configured with --enable-geoip-stats write geoip stats to disk.
...
- Write geoip stats to disk every 24 hours, not every hour.
- Remove configuration options and define reasonable defaults.
- Clear history of client requests every 24 hours (which wasn't done at
all before).
2009-05-27 19:13:31 +02:00
Karsten Loesing
02a417d4e0
Improve documentation for the last fix of bug 932.
2009-05-27 19:10:55 +02:00
Karsten Loesing
5f03d6c547
Fix bug 932 even more.
...
Ignore connections two hours after switching from bridge to relay or back.
2009-05-27 19:10:54 +02:00
Karsten Loesing
bf7e5d6553
Some cleanups on geoip.c.
...
Use two bitfields for last_seen and action in clientmap_entry_t rather
than having both share a 32-bit. Also, documentation fixes.
2009-05-26 21:32:56 +02:00
Nick Mathewson
b805e5debf
Merge commit 'origin/maint-0.2.1' into master.
...
Conflicts:
ChangeLog
configure.in
contrib/tor-mingw.nsi.in
src/win32/orconfig.h
2009-05-25 16:43:52 -04:00
Nick Mathewson
99c315a473
Use tor_socket_strerror in eventdns.c. Fixes bug 987.
2009-05-25 16:38:50 -04:00
Nick Mathewson
f334297d38
Bump version to 0.2.1.15-rc-dev.
2009-05-25 16:32:47 -04:00
Roger Dingledine
2f39eca28b
bump to 0.2.1.15-rc
2009-05-25 13:23:08 -04:00
Nick Mathewson
3b47be20ec
Update newer control_event_stream_bandwidth code to revised control impl
2009-05-25 12:55:59 -04:00
Nick Mathewson
b998fed9b9
Remove support for events without the extended format or long names.
...
Supporting the old formats made our code complex; running without them
has been discouraged since 0.2.1.x.
2009-05-25 12:52:25 -04:00
Roger Dingledine
05e55d82b6
simplify options_act()
2009-05-24 20:31:50 -04:00
Roger Dingledine
9a4b0446b0
fix a comment
2009-05-24 20:31:50 -04:00
Sebastian Hahn
f26abf5f54
fix codestyle issues
2009-05-24 02:42:37 +02:00
Martin Peck
7703b887f5
Add support for dynamic OpenSSL hardware crypto acceleration engines.
2009-05-23 16:42:44 -07:00
Jacob Appelbaum
75f963e951
Log the number and size of DNS cache entries on SIGUSR1.
...
Specifically if you send SIGUSR1, it will add two lines to the log file:
May 22 07:41:59.576 [notice] Our DNS cache has 3364 entries.
May 22 07:41:59.576 [notice] Our DNS cache size is approximately 1022656
bytes.
[tweaked a bit by nickm]
2009-05-22 23:33:44 -04:00
Nick Mathewson
793e97bb2a
Add a quick macro to calculate hashtable memory usage
2009-05-22 23:30:52 -04:00
Nick Mathewson
a3fadddd4a
Improved bug-957 fix for 0.2.2.
...
Really, our idiocy was that we were calling event_set() on the same
event more than once, which sometimes led to us calling event_set() on
an event that was already inserted, thus making it look uninserted.
With this patch, we just initialize the timeout events when we create
the requests and nameservers, and we don't need to worry about
double-add and double-del cases at all.
2009-05-22 14:06:39 -04:00
Nick Mathewson
4201a3735f
Merge commit 'origin/maint-0.2.1'
2009-05-22 11:56:51 -04:00
Nick Mathewson
1d002a25a2
Finish up the 0.2.1 version of the bug 957 fix.
...
Basically, all this means is downgrading our warning messages to debug
messages, since the bug workaround code here is adequate to stop the
bug.
2009-05-22 11:47:09 -04:00
phobos
678092750b
fix a spelling mistake in config.c for "contries"
2009-05-22 01:26:17 -04:00
Nick Mathewson
79762aac17
Merge commit 'origin/maint-0.2.1'
2009-05-18 16:17:12 -04:00
Nick Mathewson
34030a3d23
Possible fix for crash bug related to event timeouts. [Bug 957]
...
If we ever add an event, then set it, then add it again, there will be
now two pointers to the event in the event base. If we delete one and
free it, the first pointer will still be there, and possibly cause a
crash later.
This patch adds detection for this case to the code paths in
eventdns.c, and works around it. If the warning message ever
displays, then a cleverer fix is in order.
{I am not too confident that this *is* the fix, since bug 957 is very
tricky. If it is, it is a bugfix on 0.2.0.}
2009-05-18 16:12:39 -04:00
Nick Mathewson
14a549552a
Merge branch 'maint-0.2.1' into merge_tmp
2009-05-17 02:11:34 -04:00
Roger Dingledine
2fa5410218
Fix a memory leak when v3 directory authorities load their keys
...
and cert from disk. Bugfix on 0.2.0.1-alpha.
2009-05-17 02:04:59 -04:00
Nick Mathewson
c0515b307c
Fix valgrind error when marking a descriptor as never-downloadable.
...
When we got a descriptor that we (as an authority) rejected as totally
bad, we were freeing it, then using the digest in its RAM to look up its
download status. Caught by arma with valgrind. Bugfix on 0.2.1.9-alpha.
2009-05-17 02:01:09 -04:00
Nick Mathewson
11b9c839f0
Stop using malloc_usable_size(): valgrind hates it.
2009-05-17 01:55:02 -04:00
Nick Mathewson
e563874045
Merge commit 'origin/maint-0.2.1'
2009-05-17 00:05:38 -04:00
Nick Mathewson
9f25a5529a
Fix an assertion-failure in memarea_alloc() on 64-bit platforms.
...
The trick is that we should assert that our next_mem pointer has not
run off the end of the array _before_ we realign the pointer, since
doing that could take us over the end... but only if we're on a system
where malloc() gives us ram in increments smaller than sizeof(void*).
2009-05-17 00:02:59 -04:00
Mike Perry
29bf271ba2
Fix misreporting of stream bandwidths.
2009-05-14 17:52:26 -04:00
potentiate
1b61c8bf37
Fix misreporting of stream bandwidths.
2009-05-14 17:50:06 -04:00
Nick Mathewson
479d21254a
Merge commit 'origin/maint-0.2.1'
2009-05-13 16:55:42 -04:00
Nick Mathewson
a38ed1a235
Use | with flags, not +.
2009-05-13 16:45:59 -04:00
Karsten Loesing
9e97067b2f
Prevent bridges from publishing router descriptors.
...
Bridges are not supposed to publish router descriptors to the directory
authorities. It defeats the point of bridges when they are included in the
public relay directory.
This patch puts out a warning and exits when the node is configured as
a bridge and to publish v1, v2, or v3 descriptors at the same time.
Also fixes part of bug 932.
2009-05-13 16:45:59 -04:00
Nick Mathewson
fc091e8a96
When our bridge status changes, forget old geoip data.
...
This fixes bug 932, where all of our usage totals for users when we
were a regular server would get included in the extrainfo document.
2009-05-13 16:45:59 -04:00
Nick Mathewson
c36efb0c45
Use a mutex to protect the count of open sockets.
...
This matters because a cpuworker can close its socket when it
finishes. Cpuworker typically runs in another thread, so without a
lock here, we can have a race condition and get confused about how
many sockets are open. Possible fix for bug 939.
2009-05-13 09:38:48 -04:00
Nick Mathewson
d9650cfa50
Add sentinel values to the end of memarea chunks.
...
This might detect some possible causes of bug 930, and will at least
make sure we aren't doing some dumb memory-corruption stuff with the heap
and router-parsing.
2009-05-12 15:10:23 -04:00
Nick Mathewson
a271c5370a
Merge commit 'origin/maint-0.2.1' into m3
2009-05-12 14:04:51 -04:00
Sebastian Hahn
a28215a150
Warn when hibernation and low-port on non-windows is configured
...
This addresses the first part of bug 918. Users are now warned when
they try to use hibernation in combination with a port below 1024
when they're not on Windows. We don't want to die here, because
people might run Tor as root, use a capabilities system or some
other platform that will allow them to re-attach low ports.
Wording suggested by Marian
2009-05-12 20:00:00 +02:00
Nick Mathewson
5fc08d1920
Merge 0.2.1 onto the development branch.
...
Manually resolved conflicts on version number; all else applied cleanly.
2009-05-12 13:57:58 -04:00
Nick Mathewson
88d81ead83
Better debugging output for bug 977 case.
...
(Don't crash immediately if we have leftover chunks to free after
freeing chunks in a buffer freelist; instead log a debugging message
that might help.)
2009-05-12 13:54:21 -04:00
Nick Mathewson
fdbdb4dc15
Include the *_sha1.i files in their own *_codedigest.c files.
...
This way we do not need to rebuild util.c and/or config.c whenever
any unrelated source file in src/common or src/or has changed.
2009-05-08 12:35:36 -04:00
Sebastian Hahn
b9b16ef9a5
Add a missing newline
2009-05-05 11:12:41 -04:00
Sebastian Hahn
d230827912
Remove all svn metadata minus what I missed.
...
Tor doesn't use SVN anymore, making $Revision$, $Id$ and $Date$
meaningless. Remove them without replacement.
2009-05-05 17:05:46 +02:00
Karsten Loesing
948835c680
Remove unused rendversion parameters. YAGNI.
2009-05-04 13:46:30 -04:00
Karsten Loesing
f79688ddef
Clients do not request version 0 hidserv descs anymore.
2009-05-04 13:46:30 -04:00
Karsten Loesing
0d68da2381
Drop version 0 hidserv support on service side.
2009-05-04 13:46:29 -04:00
Karsten Loesing
9b32e8c141
Update copyright to 2009.
2009-05-04 11:28:27 -04:00
Karsten Loesing
4ebcc4da34
Update copyright to 2009.
2009-05-02 22:00:54 +02:00
Karsten Loesing
e25fdce900
Documentation fix.
2009-05-02 21:47:03 +02:00
Nick Mathewson
596e852c31
Remove the long-deprecated GETINFO addr-mappings/
2009-05-01 06:25:18 -04:00
Nick Mathewson
6ac3a8b0cd
Command-line option to dump SHA1 digests of all source files.
...
Now, when you call tor --digests, it dumps the SHA1 digest of each
source file that Tor was built with. We support both 'sha1sum' and
'openssl sha1'. If the user is building from a tarball and they
haven't edited anything, they don't need any program that calculates
SHA1. If they _have_ modified a file but they don't have a program to
calculate SHA1, we try to build so we do not output digests.
2009-04-29 14:46:04 -04:00
Nick Mathewson
e3ec061bc0
Bump master version to 0.2.2.0-alpha-dev.
2009-04-29 14:18:32 -04:00
Nick Mathewson
6cf933f107
Bump 0.2.1 branch version to 0.2.1.14-rc-dev
2009-04-29 14:16:15 -04:00
Sebastian Hahn
5675be39a0
Return -1 in the error case from read_bandwidth_usage.
...
svn:r19367
2009-04-23 22:04:10 +00:00
Karsten Loesing
4e6120cffb
Documentation fix.
...
svn:r19337
2009-04-16 08:25:36 +00:00
Roger Dingledine
72e4d48c7a
Update to the "April 3 2009" ip-to-country file.
...
svn:r19307
2009-04-12 08:09:38 +00:00
Roger Dingledine
a31d9cec82
bump to 0.2.1.14-rc
...
svn:r19306
2009-04-12 08:02:14 +00:00
Roger Dingledine
39ceda7e05
Raise the minimum bandwidth to be a relay from 20000 bytes to 20480
...
bytes (aka 20KB/s), to match our documentation. Also update
directory authorities so they always assign the Fast flag to relays
with 20KB/s of capacity. Now people running relays won't suddenly
find themselves not seeing any use, if the network gets faster
on average.
svn:r19305
2009-04-12 07:56:58 +00:00
Roger Dingledine
115474a44e
put HashedControlPassword and CookieAuthentication explicitly in the
...
torrc.sample.in, so unix people don't shoot themselves in the foot.
svn:r19304
2009-04-12 06:45:46 +00:00
Roger Dingledine
c024928b63
For belt-and-suspenders, relays that don't set Address in their config
...
now avoid using begin_dir for all direct connections.
svn:r19296
2009-04-11 19:40:42 +00:00
Roger Dingledine
419d158c74
make it compile too
...
svn:r19295
2009-04-11 19:22:38 +00:00
Roger Dingledine
9c6b135e1a
play make-believe that addr isn't a uint32_t
...
svn:r19293
2009-04-11 18:21:18 +00:00
Roger Dingledine
fa003351ae
fix the same bug in two more locations (thanks to lark for prodding
...
me further)
svn:r19292
2009-04-11 18:19:57 +00:00
Roger Dingledine
8d82583d97
Finally fix the bug where dynamic-IP relays disappear when their
...
IP address changes: directory mirrors were mistakenly telling them
their old address if they asked via begin_dir, so they never got
an accurate answer about their new address, so they just vanished
after a day. Should fix bugs 827, 883, and 900 -- but alas, only
after every directory mirror has upgraded.
svn:r19291
2009-04-11 18:09:15 +00:00
Roger Dingledine
235a1196b3
only log that at loglevel notice if there's a problem with the
...
version. otherwise there's no reason to tell the user we're
doing behind-the-scenes cleaning.
svn:r19288
2009-04-11 12:06:27 +00:00
Roger Dingledine
48118b228e
Clients replace entry guards that were chosen more than a few months
...
ago. This change should significantly improve client performance,
especially once more people upgrade, since relays that have been
a guard for a long time are currently overloaded.
svn:r19287
2009-04-11 12:00:18 +00:00
Roger Dingledine
7e32f0d5c8
fix a comment
...
svn:r19262
2009-04-11 00:40:11 +00:00
Roger Dingledine
93c0a81491
If the bridge config line doesn't specify a port, assume 443.
...
This makes bridge lines a bit smaller and easier for users to
understand.
Also, remove a duplicate changelog entry from the past.
svn:r19260
2009-04-11 00:16:05 +00:00
Sebastian Hahn
8390787a5f
Directory authorities should accept a descriptor as changed when the relay operator changed the bandwithrate or bandwithburst settings.
...
svn:r19259
2009-04-11 00:12:52 +00:00
Roger Dingledine
c4145e5390
commit sebastian's patch to not require contactinfo when testingtornetwork
...
is set
svn:r19257
2009-04-10 07:02:19 +00:00
Nick Mathewson
d50501e5ed
Fix a few crash bugs related to malormed descriptors. Lark found one; fuzzing found the rest.
...
svn:r19250
2009-04-09 19:58:16 +00:00
Roger Dingledine
ee58153b50
log more verbosely when we accept or decline a router descriptor,
...
to help track whether we received them when a relay operator claims
they got sent.
svn:r19213
2009-04-01 13:02:04 +00:00
Roger Dingledine
b4ceb830e0
if a directory authority declines our server descriptors because it's
...
not new enough, write that in the logs. might be helpful one day.
svn:r19195
2009-03-31 05:24:36 +00:00
Roger Dingledine
7170c5b4f8
Limit uploaded directory documents to be 16M rather than 500K.
...
The directory authorities were refusing v3 consensus votes from
other authorities, since the votes are now 504K. Fixes bug 959;
bugfix on 0.0.2pre17 (where we raised it from 50K to 500K ;).
svn:r19194
2009-03-31 04:03:37 +00:00
Roger Dingledine
793f1ce007
Directory authorities should never send a 503 "busy" response to
...
requests for votes or keys. Bugfix on 0.2.0.8-alpha; exposed by
bug 959.
svn:r19189
2009-03-31 01:29:07 +00:00
Nick Mathewson
be9d72303e
Actually do that memarea_strndup fix right. Not only must you not examine unmapped ram, but you also must not copy it. From lark.
...
svn:r19095
2009-03-21 16:01:52 +00:00
Nick Mathewson
0fa01654b9
fix from lark: make memarea_strndup() work even at the end of a mmap chunk. Bug was harmless for now, I think.
...
svn:r19094
2009-03-21 11:52:53 +00:00
Nick Mathewson
b5135f1190
Whitespace cleanup.
...
svn:r19080
2009-03-18 19:30:37 +00:00
Nick Mathewson
c2f8d97212
Do not generate the non-verbose circuit path when generating a circuit event unless we will use it.
...
svn:r19079
2009-03-18 19:30:34 +00:00
Nick Mathewson
a335b43a67
If we have a routerstatus but no routerinfo to name a router, use the routerstatus instead when generating circuit events. Also refactor a little.
...
svn:r19078
2009-03-18 19:30:30 +00:00
Nick Mathewson
e591aafca4
Add a function to get a LongName from a routerstatus. Needed for partial bug 941 fix.
...
svn:r19077
2009-03-18 19:30:26 +00:00
Nick Mathewson
cb3b95de19
Add some asserts to try to catch bug 930
...
svn:r19074
2009-03-18 15:12:56 +00:00
Nick Mathewson
30ec1d1d50
Don't double-free successful_uploads.
...
When we used smartlist_free to free the list of succesful uploads
because we had succeeded in uploading everywhere, we did not actually
set the successful_uploads field to NULL, so later it would get freed
again in rend_service_descriptor_free. Fix for bug 948; bug
introduced in 0.2.1.6-alpha.
svn:r19073
2009-03-18 14:35:24 +00:00
Nick Mathewson
ad7ebec24c
Free very-old descriptors that we do not want to add. Fix for bug 672. Backport candidate
...
svn:r19057
2009-03-16 18:47:45 +00:00
Karsten Loesing
309080b6aa
Make directory usage recording work again. Fixing bug introduced in r17009.
...
svn:r18924
2009-03-11 22:08:37 +00:00
Roger Dingledine
4e094ddc4d
when we get an unrecognized relay streamid, log it
...
svn:r18919
2009-03-11 20:51:47 +00:00
Steven Murdoch
43145fc9f5
In tor-resolve, when the Tor client to use is specified by <hostname>:<port>, actually use the specified port rather than defaulting to 9050
...
svn:r18833
2009-03-10 00:52:45 +00:00
Roger Dingledine
4774e593b8
Bugfix on r17756:
...
Avoid trying to print raw memory to the logs when we decide to
give up on downloading a given relay descriptor. Bugfix on
0.2.1.9-alpha.
svn:r18831
2009-03-09 22:05:17 +00:00
Roger Dingledine
7ee8afe82d
bump to 0.2.1.13-alpha-dev
...
svn:r18830
2009-03-09 21:43:31 +00:00
Nick Mathewson
d40cbda2cd
Log cached-at-exit exit policies to try to fix bug 672.
...
svn:r18827
2009-03-09 15:53:37 +00:00
Roger Dingledine
2f69c67957
doxygen tweak
...
svn:r18818
2009-03-09 06:20:15 +00:00
Roger Dingledine
e80ee33857
bump to 0.2.1.13-alpha
...
svn:r18814
2009-03-09 00:56:22 +00:00
Roger Dingledine
5d50bc3e1d
We were already rejecting relay begin cells with destination port
...
of 0. Now also reject extend cells with destination port or address
of 0. Suggested by lark.
svn:r18812
2009-03-09 00:53:42 +00:00
Roger Dingledine
0f46c1dc6e
Update to the "February 26 2009" ip-to-country file
...
svn:r18774
2009-03-05 10:47:25 +00:00
Nick Mathewson
cbbc0c9c86
Actually use tor_sscanf() to parse untrusted input.
...
svn:r18761
2009-03-03 18:02:36 +00:00
Nick Mathewson
26d83fc04c
Add a simple locale-independent no-surprises sscanf replacement.
...
tor_sscanf() only handles %u and %s for now, which will make it
adequate to replace sscanf() for date/time/IP parsing. We want this
to prevent attackers from constructing weirdly formed descriptors,
cells, addresses, HTTP responses, etc, that validate under some
locales but not others.
svn:r18760
2009-03-03 18:02:31 +00:00
Nick Mathewson
9f8d095e0f
Add and use set/get_uint64 on onion tags. [bug 604; backportable]
...
It seems that 64-bit Sparc Solaris demands 64-bit-aligned access to
uint64_t, but does not 64-bit-align the stack-allocated char array we
use for cpuworker tags. So this patch adds a set/get_uint64 pair, and
uses them to access the conn_id field in the tag.
svn:r18743
2009-03-02 19:15:05 +00:00
Nick Mathewson
27c3b43817
Fix one case of bug 929.
...
svn:r18683
2009-02-23 20:04:51 +00:00
Nick Mathewson
c7f3416a9e
Add some debugging code to try to catch the likely cause of bug 929
...
svn:r18682
2009-02-23 18:57:21 +00:00
Nick Mathewson
261670b57e
Patch from lark: if we get two extend cells for the same circuit id, drop the second. Previously, we had leaked an extend_info if the target connection was not open when the second arrived.
...
svn:r18668
2009-02-21 19:07:05 +00:00
Nick Mathewson
192b701fac
Patch from lark: drop BEGIN cells from a rendevous circuit if they do not originate from the end of the circuit.
...
svn:r18667
2009-02-21 19:07:01 +00:00
Roger Dingledine
1b6688786c
send the newconsensus event if the controller has asked for newconsensus
...
events, not if he's asked for ns events
svn:r18656
2009-02-20 10:25:08 +00:00
Nick Mathewson
b13496b62a
Possible fix for broken country settings in ExcludeExitNodes.
...
It turns out that we weren't updating the _ExcludeExitNodesUnion set's
country numbers when we reloaded (or first loaded!) the IP-to-country
file. Spotted by Lark. Bugfix on 0.2.1.6-alpha.
svn:r18575
2009-02-16 15:15:06 +00:00
Roger Dingledine
d3289c6b87
docdoc and changelog for r18556
...
svn:r18566
2009-02-16 10:39:10 +00:00
Roger Dingledine
d13cc5f989
and list the new event here too
...
svn:r18557
2009-02-16 06:18:44 +00:00
Roger Dingledine
9ded433abb
new controller event NEWCONSENSUS that lists the networkstatus
...
lines for every recommended relay.
still needs docdoc and changelog entry.
svn:r18556
2009-02-16 06:18:03 +00:00
Roger Dingledine
c8474f9d93
If the controller claimed responsibility for a stream, but that
...
stream never finished making its connection, it would live
forever in circuit_wait state. Now we close it after SocksTimeout
seconds. Bugfix on 0.1.2.7-alpha; reported by Mike Perry.
svn:r18516
2009-02-13 04:11:14 +00:00
Roger Dingledine
b03f78e8af
Update to the "January 23 2009" ip-to-country file
...
svn:r18503
2009-02-12 12:32:14 +00:00
Nick Mathewson
65dc835773
Revert an erroneous part of the non-fix to bug 326, and add comments to explain why it was erroneous.
...
svn:r18494
2009-02-11 17:23:11 +00:00
Nick Mathewson
6e4afe6f13
I worry that the CLEAR() macro in eventdns.c is hiding bugs. That is sad, because it was meant to make them more detectable. Change it to change stuff to garbage rather than to 0. If no bugs turn up, we can remove it in 0.2.2.x
...
svn:r18493
2009-02-11 17:22:34 +00:00
Nick Mathewson
8d9aadf57c
Port some mostly cosmetic eventdns changes from libevent
...
svn:r18492
2009-02-11 17:22:29 +00:00
Nick Mathewson
356b40f58b
Clients and non-caches do not need to cache unrecognized authority certificates.
...
svn:r18480
2009-02-10 20:28:30 +00:00
Nick Mathewson
009752823a
Enhance tor-checkkey tool so it can generate key hashes too.
...
svn:r18478
2009-02-10 20:03:58 +00:00
Karsten Loesing
34b285b09f
As an exit node, scrub the IP address to which we are exiting in the logs. Bugfix on 0.2.1.8-alpha.
...
svn:r18477
2009-02-10 18:52:47 +00:00
Nick Mathewson
91fece7be2
Don't extend introduction circuits indefinitely.
...
Doing so could run you out of relay_early cells and give you a
senselessly long circuit. Patch from Karsten; may fix bug 878.
svn:r18459
2009-02-10 00:45:30 +00:00
Nick Mathewson
6f90f6f2a2
Retry circuits if the exit node is optional and nonexistant.
...
Previously, when we had the chosen_exit set but marked optional, and
we failed because we couldn't find an onion key for it, we'd just give
up on the circuit. But what we really want to do is try again, without
the forced exit node.
Spotted by rovv. Another case of bug 752. I think this might be
unreachable in our current code, but proposal 158 could change that.
svn:r18451
2009-02-09 16:55:48 +00:00
Nick Mathewson
c7315e65ae
Disable KQUEUE from inside Tor if the OSX version is prior to 10.4.0
...
svn:r18450
2009-02-09 16:07:02 +00:00
Nick Mathewson
f99098cca4
Use prctl to reenable core dumps when we have setuid to a non-root user.
...
svn:r18449
2009-02-09 15:20:17 +00:00
Nick Mathewson
f95ab83792
Bump version to 0.2.1.12-alpha-dev
...
svn:r18448
2009-02-09 15:09:51 +00:00
Roger Dingledine
ad8e4924bd
bump to 0.2.1.12-alpha
...
svn:r18429
2009-02-09 03:28:59 +00:00
Roger Dingledine
28d97f8262
uh, and commit the patch too.
...
svn:r18423
2009-02-09 03:13:14 +00:00
Nick Mathewson
fe987d3a17
Remove some deadcode and use tor_inet_aton uniformly.
...
svn:r18422
2009-02-09 03:13:05 +00:00
Nick Mathewson
2ebdf91a52
Fix a remote-crash bug. This will need a patch release.
...
svn:r18421
2009-02-09 03:13:02 +00:00
Roger Dingledine
3845087b04
decide that mikeperry's bug should be fixed in 0.2.1.x
...
(but not in 0.2.1.12-alpha, sorry)
svn:r18417
2009-02-09 02:50:19 +00:00
Roger Dingledine
decdf4537a
If we're using bridges and our network goes away, be more willing
...
to forgive our bridges and try again when we get an application
request. Bugfix on 0.2.0.x.
svn:r18396
2009-02-04 23:27:35 +00:00
Roger Dingledine
45aeabf8f7
make a note about a clause in connection_edge.c that is probably
...
redundant, and is definitely confusing. we should take it out
in 0.2.2.x and see who squeaks.
svn:r18383
2009-02-04 08:27:36 +00:00
Nick Mathewson
261f49fe26
Fix a possible cause of bug 915 when parsing multiple votes one of which was bad. Bugfix on 0.2.0.8-alpha.
...
svn:r18354
2009-01-31 18:27:38 +00:00
Roger Dingledine
ec9c059757
give torrc.sample its yearly overhaul. the main change is to
...
merge the 'bridge relay' section into the 'main relay'
section, so people stop getting confused about whether they
should fill out both sections (they shouldn't).
svn:r18348
2009-01-30 19:37:59 +00:00
Nick Mathewson
0f2e171653
fix a wide line.
...
svn:r18341
2009-01-30 15:23:44 +00:00
Nick Mathewson
e1f03572ca
Support setting serverdnsrandomizecase during sighup. Backportable, unless too trivial.
...
svn:r18307
2009-01-28 19:53:03 +00:00
Nick Mathewson
f78793879d
Fix a race condition on nameserver reconfiguration.
...
This resolves bug 526, wherein we would crash if the following
events occurred in this order:
A: We're an OR, and one of our nameservers goes down.
B: We launch a probe to it to see if it's up again. (We do this hourly
in steady-state.)
C: Before the probe finishes, we reconfigure our nameservers,
usually because we got a SIGHUP and the resolve.conf file changed.
D: The probe reply comes back, or times out. (There is a five-second
window for this, after B has happens).
IOW, if one of our nameservers is down and our nameserver
configuration has changed, there were 5 seconds per hour where HUPing
the server was unsafe.
Bugfix on 0.1.2.1-alpha. Too obscure to backport.
svn:r18306
2009-01-28 18:26:20 +00:00
Nick Mathewson
e06de61d84
Don't obsolete a very-new connection for having no circuits yet.
...
This fixes the last known case of bug 891, which could happen if two
hosts, A and B, disagree about how long a circuit has been open,
because of clock drift of some kind. Host A would then mark the
connection as is_bad_for_new_circs when it got too old and open a new
connection. In between when B receives a NETINFO cell on the new
conn, and when B receives a conn cell on the new circuit, the new
circuit will seem worse to B than the old one, and so B will mark it
as is_bad_for_new_circs in the second or third loop of
connection_or_group_set_badness().
Bugfix on 0.1.1.13-alpha. Bug found by rovv.
Not a backport candidate: the bug is too obscure and the fix too tricky.
svn:r18303
2009-01-28 17:36:41 +00:00
Nick Mathewson
0d5f4d4e73
Remove some dead code.
...
svn:r18301
2009-01-28 17:36:34 +00:00
Nick Mathewson
8027c8c6dd
Forward-port: Fix bug 893: check AP connections for markedness before expiring them.
...
svn:r18299
2009-01-28 16:30:06 +00:00
Nick Mathewson
ef001cf85d
Actually send the extra_headers content in write_http_response_header_impl. This make X-Descriptor-Now-New get sent. Bugfix on 0.2.0.10-alpha. Spotted by "multiplication".
...
svn:r18297
2009-01-28 16:06:46 +00:00
Roger Dingledine
9fdae765e3
clean up r18287
...
svn:r18288
2009-01-28 07:16:22 +00:00
Roger Dingledine
edff606317
patch from matt to implement 'getinfo status/clients-seen'
...
svn:r18287
2009-01-28 06:50:36 +00:00
Roger Dingledine
59f57a0117
gah. yet another place that needs to be edited when we add
...
a new event. what a mess.
svn:r18277
2009-01-27 04:43:43 +00:00
Nick Mathewson
72e420ff3c
Fix typo found by Justin Coffi on or-talk
...
svn:r18258
2009-01-23 22:45:08 +00:00
Nick Mathewson
25c6ff6f55
Support 64-bit time_t. Patch from Matthias Drochner. Partial backport candidate.
...
svn:r18234
2009-01-22 16:28:12 +00:00
Nick Mathewson
8ebceeb352
Make sure that even in the weird fiddly paths that lead to init_keys,
...
crypto_global_init gets called. Also have it be crypto_global_init
that calls crypto_seed_rng, so we are not dependent on OpenSSL's
RAND_poll in these fiddly cases.
Should fix bug 907. Bugfix on 0.0.9pre6. Backport candidate.
svn:r18210
2009-01-21 15:38:39 +00:00
Nick Mathewson
bf2b71beb8
Fix an error in tor_addr_parse that kept us from having a hidden service or a bridge live at an IPv6 address.
...
svn:r18206
2009-01-21 07:24:50 +00:00
Nick Mathewson
3f8ab367c1
Fix warning on panther compile, and bug 913. Backport candidate.
...
svn:r18203
2009-01-21 03:51:14 +00:00
Roger Dingledine
a5a6b9a08a
Let controllers actually ask for the "clients_seen" event. Bugfix
...
on 0.2.1.10-alpha; reported by Matt Edman.
svn:r18201
2009-01-21 03:24:27 +00:00
Roger Dingledine
90a5042aeb
get ready for more development
...
svn:r18200
2009-01-21 02:51:30 +00:00
Roger Dingledine
3c668245b7
bump to 0.2.1.11-alpha, clean up changelog
...
svn:r18192
2009-01-20 23:33:04 +00:00
Nick Mathewson
a87980c2eb
Add a better (non-locale-having) ctypes implementation to avoid protocol and parsing mismatches on different platforms.
...
svn:r18189
2009-01-20 21:33:56 +00:00
Nick Mathewson
87124f54d0
This patch changes the default location where config and data files
...
are stored when the --enable-local-appdata option is configured. This
changes the Windows path from %APPDATA% to a host local
%USERPROFILE%\Local Settings\Application Data\ path (aka,
LOCAL_APPDATA).
Patch from coderman.
svn:r18122
2009-01-15 23:07:11 +00:00
Nick Mathewson
a899f5eaf2
make an assert tighter and replace another with an if.
...
svn:r18102
2009-01-14 06:36:33 +00:00
Nick Mathewson
6bf5d49b8a
Now that we can hit the end of router_rebuild_store before chunk_list is set, we need to test it before freeing it.
...
svn:r18101
2009-01-14 06:36:30 +00:00
Nick Mathewson
d7be03427d
Refactor MIN_IPS_TO_NOTE_* macros in geoip.c: simplify code.
...
It was dumb to have an "announce the value if it's over 0" version of
the code coexisting with an "announce the value if it's at least N"
version. Retain the latter only, with N set to 1.
Incidentally, this should fix a Coverity REVERSE_INULL warning.
svn:r18100
2009-01-14 06:20:57 +00:00
Nick Mathewson
2aaf71826d
Fix a compile warning on win32.
...
svn:r18099
2009-01-14 04:03:24 +00:00
Karsten Loesing
42c824b405
True, 17 is greater than 0. But this applies to 4111 as well.
...
svn:r18097
2009-01-13 15:02:32 +00:00
Nick Mathewson
a33452c401
Fix up (I hope) most ot the things that coverity suddenly claimed were REVERSE_INULL. This is what we get for bragging about being down to 0 issues.
...
svn:r18096
2009-01-13 14:43:51 +00:00
Nick Mathewson
c32a4ce6b3
Do the tor_assert hack everywhere in test_crypto_aes_iv.
...
svn:r18095
2009-01-13 14:43:46 +00:00
Nick Mathewson
943626050c
Fix a leak memory on the failing case of test_memeq_hex
...
svn:r18094
2009-01-13 14:43:43 +00:00
Nick Mathewson
0fe5ce423a
Fix a harmless-to-us bug in ht.h.
...
There was a field that _HT_FOI_INSERT was never setting. Everything that calls _HT_FOI_INSERT was setting it via tor_malloc_zero, but that's fragile.
svn:r18064
2009-01-10 14:40:43 +00:00
Nick Mathewson
dbc8a44bae
Fix ServerDNSRandomizeCase so that setting it to 0 works.
...
Bugfix on 0.2.1.7-alpha. Backport candidate. Fixes bug 905.
svn:r18063
2009-01-10 14:38:14 +00:00
Nick Mathewson
a0a5440826
Make the last bunch of libevent version detection silliness work on macosx.
...
svn:r18015
2009-01-07 21:13:02 +00:00
Nick Mathewson
a6504cdea7
Check that Libevent header version matches Libevent library version.
...
Unfortunately, old Libevents don't _put_ a version in their headers, so
this can get a little tricky. Fortunately, the only binary-compatibility
issue we care about is the size of struct event. Even more fortunately,
Libevent 2.0 will let us keep binary compatiblity forever by letting us
decouple ourselves from the structs, if we like.
svn:r18014
2009-01-07 21:05:02 +00:00
Roger Dingledine
c123163043
Discard router descriptors as we load them if they are more than
...
five days old. Otherwise if Tor is off for a long time and then
starts with cached descriptors, it will try to use the onion
keys in those obsolete descriptors when building circuits. Bugfix
on 0.2.0.x. Fixes bug 887.
svn:r17993
2009-01-07 02:13:42 +00:00
Roger Dingledine
18ffea77ae
actually find the right identity_digest to blame when we get
...
a destroy cell from our first hop.
svn:r17991
2009-01-07 00:30:12 +00:00
Roger Dingledine
bf33182459
well, that was a disaster. this time for sure.
...
svn:r17989
2009-01-06 22:20:31 +00:00
Roger Dingledine
c052494a4f
no actual changes besides a seg fault on startup, i meant
...
svn:r17986
2009-01-06 21:42:05 +00:00
Roger Dingledine
cdda852cec
simplify. no actual changes i think. ;)
...
svn:r17985
2009-01-06 21:31:46 +00:00
Roger Dingledine
b36a98ff5a
When our circuit fails at the first hop (e.g. we get a destroy
...
cell back), avoid using that OR connection anymore, and also
tell all the one-hop directory requests waiting for it that they
should fail. Bugfix on 0.2.1.3-alpha.
svn:r17984
2009-01-06 21:28:48 +00:00
Nick Mathewson
462f64b6b9
Make outgoing DNS requests respect OutboundBindAddress.
...
Fixes the bug part of bug 789.
svn:r17983
2009-01-06 20:50:55 +00:00
Nick Mathewson
585d4a12b5
Note a problem in the interface tor_addr_to_sockaddr.
...
svn:r17982
2009-01-06 20:50:51 +00:00
Roger Dingledine
e61c40e9f4
ok, all set to destabilize it again
...
svn:r17980
2009-01-06 20:38:05 +00:00
Roger Dingledine
2d9e8a75b8
bump to 0.2.1.10-alpha, reorganize the changelog
...
svn:r17974
2009-01-06 20:11:47 +00:00
Roger Dingledine
4f27e73aaa
clarify which relay gave us the good netinfo cell
...
svn:r17973
2009-01-06 19:21:47 +00:00
Roger Dingledine
68806c7fb7
When a relay gets a create cell it can't decrypt (e.g. because it's
...
using the wrong onion key), we were dropping it and letting the
client time out. Now actually answer with a destroy cell. Bugfix
on 0.0.2pre8.
svn:r17970
2009-01-06 19:03:15 +00:00
Roger Dingledine
0955a1b9e1
Jan 06 13:03:57.309 [info] networkstatus_set_current_consensus(): Loaded an obsolete consensus. Discarding.
...
Jan 06 13:03:57.309 [warn] Couldn't load consensus networkstatus from "bridge/cached-consensus"
doesn't need a real warn.
svn:r17969
2009-01-06 18:06:49 +00:00
Roger Dingledine
d1351750ed
Update to the "December 19 2008" ip-to-country file
...
svn:r17968
2009-01-06 18:03:01 +00:00
Nick Mathewson
5e44581412
Clean up (and mark for 0.2.2.) comments relating to non-beauty of current bug-743 fix.
...
svn:r17966
2009-01-06 17:37:22 +00:00
Nick Mathewson
6f1ceaefaa
Slightly better messages on ControlListenAddress 0.0.0.0
...
svn:r17963
2009-01-06 16:57:42 +00:00
Roger Dingledine
e127072318
Prevent bridge relays from serving their 'extrainfo' document
...
to anybody who asks, now that extrainfo docs include potentially
sensitive aggregated client geoip summaries.
svn:r17958
2009-01-06 16:03:38 +00:00
Nick Mathewson
9abfb564a0
Make dirserv_get_routerdesc_fingerprints() treat extrainfos with send_unencrypted==0 correctly. Irrelevant, since we will soon never send them at all.
...
svn:r17953
2009-01-06 15:37:51 +00:00
Roger Dingledine
d95b63f1e4
Bugfix on r13098. Backport candidate.
...
When we made bridge authorities stop serving bridge descriptors over
unencrypted links, we also broke DirPort reachability testing for
bridges. So bridges with a non-zero DirPort were printing spurious
warns to their logs. Bugfix on 0.2.0.16-alpha. Fixes bug 709.
svn:r17945
2009-01-06 07:13:24 +00:00
Nick Mathewson
f772fc0c36
apply a variant of rovv's bug 872 patch, and document that we want a better solution for 0.2.2.x.
...
svn:r17924
2009-01-05 20:52:14 +00:00
Roger Dingledine
e3388230c4
Bridge relays that had DirPort set to 0 would stop fetching
...
descriptors shortly after startup, and then briefly resume
after a new bandwidth test and/or after publishing a new bridge
descriptor. Bridge users that try to bootstrap from them would
get a recent networkstatus but would get descriptors from up to
18 hours earlier, meaning most of the descriptors were obsolete
already. Reported by Tas; bugfix on 0.2.0.13-alpha.
svn:r17920
2009-01-05 18:54:11 +00:00
Roger Dingledine
9e75c06197
If the cached networkstatus consensus is more than five days old,
...
discard it rather than trying to use it. In theory it could
be useful because it lists alternate directory mirrors, but in
practice it just means we spend many minutes trying directory
mirrors that are long gone from the network. Helps bug 887 a bit;
bugfix on 0.2.0.x.
svn:r17917
2009-01-05 16:56:11 +00:00
Mike Perry
da430cfcf7
Preserve reporting of stream end reasons to the local control
...
port. They were lost in the changes for Proposal 148.
svn:r17911
2009-01-05 14:14:57 +00:00
Karsten Loesing
fe9790740f
Use doxygen-style comments instead of C-style comments.
...
svn:r17893
2009-01-04 23:44:43 +00:00
Nick Mathewson
765bb14f69
Another fun openbsd warning fix. On ioerror's computer at least, they redefined an unsigned field in zlib.h to be signed. I am quite sure this makes me more secure somehow.
...
svn:r17892
2009-01-04 23:15:42 +00:00
Nick Mathewson
743c6c8277
OpenBSD malloc.h believes that you should be able to detect headers with autoconf, or build without warnings, but not both. So never include malloc.h on OpenBSD. Backport candidate.
...
svn:r17891
2009-01-04 22:47:42 +00:00
Karsten Loesing
26482e855b
Document some variables used for generating statistics on usage of V0 hidden service directory authorities.
...
svn:r17890
2009-01-04 19:59:35 +00:00
Nick Mathewson
92ce533f71
Another round of downgrading removing or postponing XXXX021 issues. Some remain, though.
...
svn:r17888
2009-01-04 19:47:21 +00:00
Nick Mathewson
9c94b428d9
Fix the oldest bug in a while: stop accepting 1.2.3 as a valid IPv4 address on any platform.
...
svn:r17887
2009-01-04 19:47:17 +00:00
Nick Mathewson
360a059948
Fix an xxx021: do not remove routerinfos as too old and unlisted unless we have a consensus. Backport candidate.
...
svn:r17886
2009-01-04 19:47:12 +00:00
Nick Mathewson
c4b8fef362
Remove svn $Id$s from our source, and remove tor --version --version.
...
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
9201586ed5
Another attempt at fixing coverity scan CID 361.
...
svn:r17863
2009-01-03 23:06:12 +00:00
Nick Mathewson
9c20441bcb
Only set sin_len/sin6_len when they exist.
...
svn:r17851
2009-01-02 20:57:10 +00:00
Roger Dingledine
89d268848f
take out my IMPOSSIBLE_TO_DOWNLOAD+1 hack
...
svn:r17850
2009-01-02 20:46:32 +00:00
Nick Mathewson
48f2ce298b
Try harder to make sure we zero-out the extraneous sockaddr fields and that we set sockaddr_len. Conceivably a backport candidate, though nothing has yet been sen to break.
...
svn:r17849
2009-01-02 20:39:38 +00:00
Nick Mathewson
b07baba879
Increment n_download_failures up to IMPOSSIBLE_TO_DOWNLOAD-1, not up to IMPOSSIBLE_TO_DOWNLOAD.
...
svn:r17835
2008-12-31 17:22:18 +00:00
Roger Dingledine
dfc6555ddd
switch over the bridge descriptor download mechanism to
...
use the same download mechanism as other places.
i had to make an ugly hack around "IMPOSSIBLE_TO_DOWNLOAD+1".
we should unhack that sometime.
svn:r17834
2008-12-31 14:19:57 +00:00
Roger Dingledine
9ea7e7f0cd
fix a bug in download failure logging; don't do this "stop
...
downloading forever" thing with bridge descriptor downloads.
svn:r17833
2008-12-31 14:11:46 +00:00
Karsten Loesing
9a04358d87
Debug code for task 878.
...
svn:r17828
2008-12-30 11:43:50 +00:00
Nick Mathewson
52932d6f1a
Remove some code that is #ifdefed out, and that we no longer seem to use, if we ever did.
...
svn:r17827
2008-12-30 04:16:49 +00:00
Nick Mathewson
ffe22fab9b
Indeed, arma was right. There was one ntohl too many in debug_ntop in eventdns.c
...
svn:r17826
2008-12-30 04:08:45 +00:00
Roger Dingledine
c190842a34
point out the bug location to nick. unless i'm wrong.
...
svn:r17825
2008-12-30 02:36:11 +00:00
Nick Mathewson
3a8a2cb2de
Downgrade some xxx021s, comment more on others, etc
...
svn:r17823
2008-12-29 20:17:24 +00:00
Nick Mathewson
8625297cee
Actually log reasons on unusable guards again.
...
svn:r17822
2008-12-29 20:17:20 +00:00
Nick Mathewson
d640e2ab00
Spec compliance: if weighted MTBF of a router is at least 5 days, always vote it as Stable.
...
svn:r17821
2008-12-29 20:17:18 +00:00
Nick Mathewson
f7fb1bf931
Refactor sockaddr family match check into a new function
...
svn:r17820
2008-12-29 19:57:17 +00:00
Nick Mathewson
83491796ee
Explain why the XXXX021 in connection_or.c was there, and explain why it doesn' actually need to get fixed in 0.2.1, I think.
...
svn:r17819
2008-12-29 19:57:13 +00:00
Nick Mathewson
45bd6c650d
Replace kludgy assert with something a little less awful, and avoid needless strlcpy in rend descriptor encoding.
...
svn:r17818
2008-12-29 19:57:08 +00:00
Nick Mathewson
76a2e11f91
Downgrade the last xxx021 in routerparse. The duplicate code stands for now.
...
svn:r17817
2008-12-29 19:57:04 +00:00
Nick Mathewson
c1c7f982d9
Do not not cannibalize a circuit that has run out of RELAY_EARLY cells. Partial bug 878 fix.
...
svn:r17815
2008-12-29 19:55:17 +00:00
Nick Mathewson
145ead96ed
Do not cannibalize a circuit that has run out of RELAY_EARLY cells. Partial bug 878 fix.
...
svn:r17814
2008-12-29 19:55:13 +00:00
Nick Mathewson
a332805a55
Extact parse-the-token-arguments to its own function, and change it to a single-pass algorithm. This simplifies the parsing code and speeds it up a little.
...
svn:r17812
2008-12-29 16:54:56 +00:00
Nick Mathewson
fa6e72dc4b
Remove a call to find_whitespace_eos that didn't actually do anything.
...
svn:r17811
2008-12-29 16:54:51 +00:00
Nick Mathewson
a42e82b0de
While I'm at it, refactor control.c a little so that the dead code no longer exists.
...
svn:r17810
2008-12-29 14:21:25 +00:00
Nick Mathewson
272b007268
coverity thinks it's dumb to check networkstatus_v2_list in one place and not another. Coverity has a point, even though the check may be redundant. CID 361.
...
svn:r17809
2008-12-29 14:06:47 +00:00
Nick Mathewson
2c4097e99d
More compilation tweaks on Android: fix two clear errors in our code that apparently the compiler cares about there.
...
svn:r17808
2008-12-29 04:01:58 +00:00
Nick Mathewson
e8a3fa91a6
Use a consistent naming standard for header file guard macros, taking care not to collide with any system headers. This tripped us up on Android.
...
svn:r17805
2008-12-29 02:21:02 +00:00
Nick Mathewson
b0a8ecd193
Use RSA_generate_key_ex where available.
...
svn:r17804
2008-12-29 02:20:57 +00:00
Nick Mathewson
46f8ef8116
Switch address comparisons in policies to be exact rather than semantic. Until we do ipv6 exit policies and until we know whether we even allow ::ffff:0:0/96 addresses, there is no point in doing "semantic" comparisons. This was also showing up on oprofile.
...
svn:r17803
2008-12-29 01:47:33 +00:00
Nick Mathewson
870fd18b8f
Refactor some exit-policy-related functions that showed up in oprofile.
...
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch
of complicated ifs inside into some ifs, each with a simple loop. Rearrange
router_find_exact_exit_enclave() to run a little faster. Bizarrely,
router_policy_rejects_all() shows up on oprofile, so precalculate it per
routerinfo.
svn:r17802
2008-12-29 01:47:28 +00:00
Nick Mathewson
94507f1b6d
Fix bug in recent address.c patch: actually set the value of address * to 0.0.0.0 as we did before. This makes CMP_EXACT comparisons with bitmask 0 work on address * again.
...
svn:r17801
2008-12-29 01:30:35 +00:00
Nick Mathewson
ccda4e481c
Fix compilation under gethostbyname-based systems.
...
svn:r17800
2008-12-27 15:46:16 +00:00
Nick Mathewson
ae71b52945
remove the responsibility for setting listensocklen to the function that made the sockaddr
...
svn:r17799
2008-12-27 15:46:13 +00:00
Roger Dingledine
365c72246c
partial move to letting bridge descriptor fetches use our new (well,
...
new from their perspective) directory download schedule abstraction.
not done yet, but i'd better get this out of my sandbox before nick
does another sweeping change. :)
svn:r17798
2008-12-27 07:30:47 +00:00
Roger Dingledine
5519e633ec
New controller event "clients_seen" to report a geoip-based summary
...
of which countries we've seen clients from recently. Now controllers
like Vidalia can show bridge operators that they're actually making
a difference.
svn:r17796
2008-12-27 06:50:07 +00:00
Nick Mathewson
0c5e03fa21
Remove a deprecated controller alias; make another one generate a warning.
...
svn:r17793
2008-12-27 00:20:08 +00:00
Nick Mathewson
a87335472c
Make connection_create_listener take a sockaddr_len, not just a sockaddr whose length we try to divine.
...
svn:r17792
2008-12-27 00:20:06 +00:00
Nick Mathewson
b3b14bf25d
Add some early checks to keep ipv6 addresses from failing by accident. Now, they fail on purpose, at least till 0.2.2.something.
...
svn:r17791
2008-12-26 22:51:25 +00:00
Nick Mathewson
374c1e979f
Refactor tor_addr_t manipulation functions so that as few as possible look at the tor_addr_t representation.
...
svn:r17790
2008-12-26 21:26:05 +00:00
Nick Mathewson
616f6643ef
get_interface_addr6(), and by extension get_interface_addr(), were pretty borked. Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion.
...
svn:r17789
2008-12-26 21:26:03 +00:00
Nick Mathewson
61722638ea
Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0.
...
svn:r17788
2008-12-26 20:37:18 +00:00
Nick Mathewson
f182e9707f
Bump version to 0.2.1.9-alpha-dev
...
svn:r17787
2008-12-26 17:39:22 +00:00
Nick Mathewson
f7adc017c4
Document and make more conservative the logic for picking the size of the bloom filter to use for retaining descriptors.
...
svn:r17786
2008-12-26 17:35:36 +00:00
Nick Mathewson
73e1a1d26e
Document our Bloom filter parameter choices.
...
svn:r17785
2008-12-26 17:35:18 +00:00
Nick Mathewson
0f9f45ff33
Document the pk operation count fields in rephist.c, and move them into a struct for clarity, and change their type to what we actually want to cast them to.
...
svn:r17784
2008-12-26 17:35:12 +00:00
Nick Mathewson
df5e8f65bc
Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
...
svn:r17783
2008-12-26 17:35:08 +00:00
Roger Dingledine
20f964c6da
prepare for 0.2.1.9-alpha
...
svn:r17778
2008-12-25 20:32:49 +00:00
Roger Dingledine
2a42986c96
ok, fair enough, some of these variables were time_t's after all
...
svn:r17777
2008-12-25 20:16:22 +00:00
Roger Dingledine
4ff04fda77
so which is it? TIME_MAX or INT_MAX? pick INT_MAX for now.
...
svn:r17772
2008-12-25 15:42:03 +00:00
Roger Dingledine
a12c3f2c86
some fixes i found in my sandbox
...
svn:r17771
2008-12-25 15:37:47 +00:00
Nick Mathewson
272e64e674
Use the literal parse of an address in dns_resolve_impl if parsing the address as an ipv4 or ipv6 address _succeeded_. Not if it failed. Bug introduced in r17707 (post 0.2.1.8-alpha), and found by xiando.
...
svn:r17758
2008-12-24 02:38:07 +00:00
Nick Mathewson
df608fef45
Checkpoint my big bug-891 patch.
...
svn:r17757
2008-12-24 02:38:04 +00:00
Nick Mathewson
ac2f6b608a
Patch from Sebiastian for bug 888: mark a descriptor as "Impossible" if we reject it after downloading it so that we do not download it again
...
svn:r17756
2008-12-23 21:17:52 +00:00
Nick Mathewson
e6bf9fdf94
Remove bogus extern declaration for unused (and nonexistant) field from test.c
...
svn:r17755
2008-12-23 17:56:39 +00:00
Nick Mathewson
558e9899e4
Document most undocumented variables.
...
svn:r17754
2008-12-23 17:56:31 +00:00
Nick Mathewson
d7f55dafe0
Properly zero-out addresses when setting them. Probably this was not hurting anything.
...
svn:r17749
2008-12-23 14:21:34 +00:00
Nick Mathewson
b4d387c28b
Make freelist_len in memarea.c static; document a few variables.
...
svn:r17741
2008-12-22 19:14:08 +00:00
Nick Mathewson
7d79bec54d
Expose bench_* functions via test cli
...
svn:r17740
2008-12-22 19:00:09 +00:00
Nick Mathewson
b68379b13b
Add DOCDOC entries for undocumented static and global variables.
...
svn:r17739
2008-12-22 19:00:05 +00:00
Nick Mathewson
43b111535a
Make doxygen not complain about the way we spell CRLFNUL in control.c
...
svn:r17735
2008-12-22 17:53:30 +00:00
Nick Mathewson
1e5f457461
Fix most DOCDOCs remaining and/or added by redox.
...
svn:r17734
2008-12-22 17:53:04 +00:00
Nick Mathewson
167d266dbf
Documentation and conformance for WRA_* returns.
...
shahn: "Add some documentation for the WRA_* family of functions, also make
sure that (hopefully) all functions that return was_router_added_t
don't return ints directly and that they don't refer to integers in
their documentation anymore."
svn:r17731
2008-12-22 16:37:20 +00:00
Nick Mathewson
1e666bfcc1
Partially apply bug 891 parch from forest: check EXTEND cell address against real_addr, not addr. I have questions about the rest of the patch: see the flyspray entry.
...
svn:r17730
2008-12-22 16:22:04 +00:00
Nick Mathewson
1725c0c8a5
Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
...
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
55348884b5
Fix all of the doxygen warnings not pertaining to missing documentation.
...
svn:r17727
2008-12-22 14:56:16 +00:00
Roger Dingledine
df89748388
fix typo noticed by wood
...
svn:r17726
2008-12-22 09:52:56 +00:00
Roger Dingledine
0f6514e041
some windows users are outraged that tor refuses to work even
...
when their clock and date are correct, if their timezone is
totally wrong. now we at least tell them.
svn:r17725
2008-12-22 09:10:06 +00:00
Roger Dingledine
0c6ff7d990
the default should not be the notify the poster, unless something
...
more extreme happens. the default should be to be quiet unless
something more extreme happens.
at least, this doesn't generate complaints anymore. perhaps that
means it is working better? :)
svn:r17724
2008-12-22 06:25:49 +00:00
Roger Dingledine
7262bf5eab
fix a fun bug on r17656 that was making us send HTTP/1.0 404 as
...
the message body, no matter the message headers, when answering
a descriptor or extrainfo post request.
svn:r17723
2008-12-22 06:21:28 +00:00
Nick Mathewson
e36c7a74bd
Yet still more propagating of things that need to be was_router_added_t now.
...
svn:r17722
2008-12-22 05:21:49 +00:00
Nick Mathewson
98a376fab1
More propagating of things that need to be was_router_added_t now.
...
svn:r17721
2008-12-22 04:53:11 +00:00
Nick Mathewson
df22dcb602
WRA_MORE_SEVERE is not WRA_GET_MORE_SEVERE.
...
svn:r17720
2008-12-22 04:36:52 +00:00
Karsten Loesing
61055ae719
gabelmoo has a new IP address (once more).
...
svn:r17717
2008-12-22 00:48:10 +00:00
Nick Mathewson
029be5ad02
Move in-addr.arpa parsing and generation into address.c, and simplify the code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses.
...
svn:r17707
2008-12-19 18:52:00 +00:00
Nick Mathewson
efb863189c
Expose hex_decode_digit from util.c
...
svn:r17706
2008-12-19 18:51:52 +00:00
Nick Mathewson
a259af179b
When we need to open a new origin circuit, log why.
...
svn:r17705
2008-12-19 18:51:49 +00:00
Nick Mathewson
16f1d4cb72
Doc RRS_DONT_REMOVE_OLD; improve router_rebuild_store documentation.
...
svn:r17704
2008-12-19 18:51:44 +00:00
Nick Mathewson
8c90a4b7ee
More approx_time() calls. Noted by forest.
...
svn:r17702
2008-12-19 18:51:35 +00:00
Nick Mathewson
c67bd80487
Make cell pools always-on.
...
svn:r17692
2008-12-18 17:28:50 +00:00
Nick Mathewson
c3e4b12e7f
Why were we using gettimeofday() in second_elapsed_callback? We were only ever looking at the tv_sec field.
...
svn:r17691
2008-12-18 17:19:23 +00:00
Nick Mathewson
bf80e2df3f
Replace calls to time(NULL) that occur on the order of once per read, one per write, or once per cell with calls to a function that looks at a cached value of time. This is tricksy to benchmark, since it will only help on systems where time() is a syscall and syscalls are relatively slow.
...
svn:r17690
2008-12-18 17:19:04 +00:00
Nick Mathewson
b91335117f
Document the purpose argument of circuit_find_to_cannibalize
...
svn:r17689
2008-12-18 17:18:14 +00:00
Nick Mathewson
b6f89a647a
One log.c XXX021 was a misunderstanding. Also, clip log messages passed to syslog to their maximum length when there is a maximum.
...
svn:r17688
2008-12-18 17:18:06 +00:00
Nick Mathewson
122170c1d3
Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
...
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
6c6b0283cb
Ben confirms that the MUST in rfc2631 is only for compatibility with X9.42, and isn't actually a security thing.
...
svn:r17685
2008-12-18 16:11:16 +00:00
Nick Mathewson
8d5a9d762c
Log an error on win32 if directory listing fails.
...
svn:r17684
2008-12-18 16:11:12 +00:00
Nick Mathewson
c449e6e5be
whitespace fixes.
...
svn:r17683
2008-12-18 16:11:08 +00:00
Nick Mathewson
ecaee1d927
Remove fixed xxx020s; downgrade unfixed ones.
...
(The unfixed ones are being downgraded to regular XXXs mainly on the rationale that they don't seem to be exploding Tor, and they were apparently not showstoppers for 0.2.0.x-final.)
svn:r17682
2008-12-18 16:11:03 +00:00
Nick Mathewson
f9133f2528
Fix a memory leak of one address string per DNSPort request.
...
svn:r17681
2008-12-18 15:00:27 +00:00
Nick Mathewson
148e4e8837
Do not leak the DNS server port structure.
...
svn:r17680
2008-12-18 15:00:18 +00:00
Nick Mathewson
4911ec627b
Call release_lockfile() before exiting.
...
svn:r17679
2008-12-18 15:00:13 +00:00
Nick Mathewson
9c3d17ebb5
Fix a small memory leak of around 32 bytes per TLS connection opened. Bugfix on 0.2.1.1-alpha.
...
svn:r17678
2008-12-18 15:00:09 +00:00
Nick Mathewson
290b6f54a3
Make unit tests slower but more reliable by disabling an old optimization.
...
To turn it back on, re-define CACHE_GENERATED_KEYS option in test.c.
svn:r17677
2008-12-18 06:12:19 +00:00
Nick Mathewson
8ba2a15a49
Fix more leaks in unit tests.
...
svn:r17676
2008-12-18 06:02:23 +00:00
Nick Mathewson
1b735e46dd
Make it possible to call set_onion_key twice without leaking RAM.
...
svn:r17673
2008-12-18 05:40:57 +00:00
Nick Mathewson
cebdf93949
Fix bug 889: share deep-copied keys between threads to avoid races in reference counts. Bugfix on 0.1.0.1-rc.
...
svn:r17672
2008-12-18 05:28:27 +00:00
Roger Dingledine
7b5be147ee
fix a minor memory leak if we start up as a relay but don't
...
have any files in the cached-status/ directory
svn:r17671
2008-12-18 05:15:11 +00:00
Nick Mathewson
d597b23c42
Massage a little code to hopfully please coverity.
...
svn:r17669
2008-12-18 04:45:51 +00:00
Nick Mathewson
f3f6daf819
Avoid nop call to control_event_or_authdir_new_descriptor that makes coverity think we are dereferencing a null pointer. It is safe, I think, but entirely too clever for our own good.
...
svn:r17668
2008-12-18 04:45:47 +00:00
Nick Mathewson
676175103d
Fix a valgrind-located memory stomp. Bugfix on 0.2.1.6-alpha.
...
svn:r17667
2008-12-18 04:27:23 +00:00
Nick Mathewson
5c235cb5ec
Fix memory leak in rend_cache_store_v2_desc_as_client(), and refactor the function to use the "goto err" idiom.
...
svn:r17665
2008-12-18 00:11:49 +00:00
Nick Mathewson
1510d50fab
Oops: SeverDNS->ServerDNS.
...
svn:r17664
2008-12-17 23:20:07 +00:00
Nick Mathewson
7d92053286
Remove RedirectExit feature; it has been deprecated since 0.2.0.3-alpha
...
svn:r17663
2008-12-17 23:02:04 +00:00
Nick Mathewson
6693f32530
Resolve many DOCDOCs.
...
svn:r17662
2008-12-17 22:58:20 +00:00
Nick Mathewson
2ad36f68c8
Rename ServerDNSAllowBrokenResolvConf to ServerDNSAllowBrokenConfig.
...
(Many users have no idea what a resolv.conf is, and shouldn't be forced to learn. The old option will keep working for now.)
Also, document it.
svn:r17661
2008-12-17 22:58:14 +00:00
Roger Dingledine
03f413f5c7
declare that we're putting out 0.2.1.9-alpha next week
...
svn:r17659
2008-12-17 22:46:00 +00:00
Roger Dingledine
048f2a179b
Clip the MaxCircuitDirtiness config option to a minimum of 10
...
seconds. Warn the user if lower values are given in the
configuration. Bugfix on 0.1.0.1-rc. Patch by Sebastian.
Clip the CircuitBuildTimeout to a minimum of 30 seconds. Warn the
user if lower values are given in the configuration. Bugfix on
0.1.1.17-rc. Patch by Sebastian.
svn:r17657
2008-12-17 22:32:17 +00:00
Nick Mathewson
33e2053ebc
Make return code from router_add_to_routerlist a nice sensible enum. Based on patch from Sebastian.
...
svn:r17656
2008-12-17 21:50:01 +00:00
Nick Mathewson
2de9bd7bae
Rename a couple of v2-networkstatus-only fields so that it is clear they are v2-networkstatus-only.
...
svn:r17652
2008-12-17 17:20:48 +00:00
Nick Mathewson
f43bcdc063
Use ctags and a python script to find identifiers that are never used anywhere, and remove the ones that we really want gone.
...
svn:r17651
2008-12-17 17:20:42 +00:00
Nick Mathewson
fc5e686b19
Whitespace fix.
...
svn:r17650
2008-12-17 17:20:36 +00:00
Nick Mathewson
1beb1c113b
Add some missing documentation in or.h
...
svn:r17649
2008-12-17 17:20:31 +00:00
Nick Mathewson
0dc724d19c
Make ALLOW_INVALID_* into an enum.
...
svn:r17648
2008-12-17 17:20:26 +00:00
Nick Mathewson
d0e1cc6fe2
Remove the no-longer-used incoming_cmd_type field from control_connection_t.
...
svn:r17647
2008-12-17 17:20:22 +00:00
Nick Mathewson
68a6935afb
Change CELL_DIRECTION_* to an enum.
...
svn:r17646
2008-12-17 17:20:19 +00:00
Nick Mathewson
44e19a4949
Oops; remove extraneous comma.
...
svn:r17644
2008-12-17 15:04:43 +00:00
Nick Mathewson
7678ac5193
Move edge-only flags from connection_t to edge_connection_t.
...
svn:r17643
2008-12-17 14:59:28 +00:00
Nick Mathewson
26632d59dd
Rename or_is_obsolete and move it to or_connection_t where it belongs.
...
svn:r17642
2008-12-17 14:59:19 +00:00
Nick Mathewson
e53ffaa4e4
Don't extend circuits over noncanonical connections with mismatched addresses.
...
Also, refactor the logic to check whether we will use a connection or
launch a new one into a new function.
svn:r17628
2008-12-15 21:17:53 +00:00
Nick Mathewson
51c29e1e24
Apply rovv's bug 805 fix: take more care never to prefer a non-canonical connection.
...
svn:r17627
2008-12-15 21:17:43 +00:00
Roger Dingledine
5822e14dc9
When a stream at an exit relay is in state "resolving" or
...
"connecting" and it receives an "end" relay cell, the exit relay
would silently ignore the end cell and not close the stream. If
the client never closes the circuit, then the exit relay never
closes the TCP connection. Bug introduced in Tor 0.1.2.1-alpha;
reported by "wood".
svn:r17625
2008-12-14 19:40:56 +00:00
Roger Dingledine
2ad06eef11
comment tweak
...
svn:r17624
2008-12-14 19:39:54 +00:00
Nick Mathewson
a4a481d81c
Implement proposal 148: Make client stream end reasons uniform.
...
This patch makes every RELAY_COMMAND_END cell that we send pass through one of two functions: connection_edge_end and relay_send_end_cell_from_edge. Both of these functions check the circuit purpose, and change the reason to MISC if the circuit purpose means that it's for client use.
svn:r17612
2008-12-12 20:30:42 +00:00
Nick Mathewson
5fb2ab1e65
Implement the /tor/keys/fp-sk/ URL format. That mostly finishes the server side of 157.
...
svn:r17611
2008-12-12 19:05:36 +00:00
Nick Mathewson
69ce955484
Add cross-certification to authority key certificates. Partial implementation of proposal 157.
...
svn:r17610
2008-12-12 18:31:39 +00:00
Nick Mathewson
519de7970e
Do not discard sign on return values of iv crypto functions in tests. May fix CID 9. Might not.
...
svn:r17603
2008-12-11 21:11:31 +00:00
Nick Mathewson
7e351a6341
Note that a couple of line in control.c are supposed to be dead-code.
...
I'm hoping not to have to litter the rest of our codebase with Coverity ignores, but I think these are the only one we need right now.
svn:r17602
2008-12-11 21:11:28 +00:00
Nick Mathewson
02e26ebc49
If we are building under Coverity, enable geoip_stats and instrument_downloads.
...
This makes sure that a) optional code gets analyzed too, and b) it doesn't
look like dead code to Coverity.
svn:r17601
2008-12-11 21:11:26 +00:00
Nick Mathewson
98066d62bc
Lower sprintf buffer max to ~SSIZE_T_MAX from SIZE_T_CEILING, since we need to compare it to a signed int.
...
svn:r17600
2008-12-11 21:11:22 +00:00
Nick Mathewson
b20694758e
Fix two more unit-test bugs (deadcode this time) spotted by Coverity run 7.
...
CIDs == 357, 356.
svn:r17599
2008-12-11 21:11:19 +00:00
Nick Mathewson
04ec7d1f98
Now that tor_assert is no longer using a broken force-to-boolean formulation, we can tor_assert a bitfield without a gcc compile error.
...
svn:r17598
2008-12-11 20:28:50 +00:00
Nick Mathewson
4277b0e926
Remove some cargo-cult gcc hacks around tor_assert and predict_unlikely; instead, use the standard convert-to-boolean hack of "svn st"
...
svn:r17597
2008-12-11 20:23:46 +00:00
Nick Mathewson
d9aa57253d
Fix error in last unit test mem-leak-fixing.
...
svn:r17596
2008-12-11 19:41:03 +00:00
Nick Mathewson
bb02f919f1
Refactor find_first_by_keyword into one variant that can return NULL and one that can't.
...
This makes it easier for us to avoid errors where we we forgot to list a keyword as mandatory, and easier for Coverity to detect cases like this too.
svn:r17595
2008-12-11 19:40:58 +00:00
Nick Mathewson
f3b52e331e
Avoid multiple descriptor-fetch connections to authorities. Fixes bug 366.
...
svn:r17594
2008-12-11 19:12:55 +00:00
Nick Mathewson
043b4fc59e
Add a PDS_ flag to exclude authorities from which we are fetching descs.
...
Yes, this is maybe a little overspecific. Part of a bug 366 fix.
svn:r17593
2008-12-11 19:12:48 +00:00
Nick Mathewson
29f5a65a16
Change directory_get_from_dirserver to take a set of flags to be passed to pick_(trusted_)dirserver. This lets us make its interface smarter, and makes code that calls it a little more readable.
...
svn:r17592
2008-12-11 19:12:45 +00:00
Nick Mathewson
4e69284e89
Fix wide line in main.c
...
svn:r17587
2008-12-11 17:23:00 +00:00
Nick Mathewson
240ee1866b
Add experimental support for learning svn revision number in git-svn based repositories. Fancy.
...
svn:r17581
2008-12-11 06:52:24 +00:00
Nick Mathewson
d7563ee231
Fix memory leaks in test_util_smartlist_* functions.
...
svn:r17580
2008-12-11 06:18:09 +00:00
Nick Mathewson
595e77c8d7
Fix memory leaks in test_v3_networkstatus.
...
svn:r17579
2008-12-11 06:18:01 +00:00
Nick Mathewson
6ffb4d4ab6
Fix memory leaks in test_dir_format
...
svn:r17578
2008-12-11 06:17:59 +00:00
Nick Mathewson
3be88b2c70
Change test_memeq macro to not leak memory. Addresses coverity CID 47.
...
svn:r17577
2008-12-11 06:17:54 +00:00
Nick Mathewson
d8027aa689
Fix a logic error that would automatically reject all but the first configured DNS server. Bugfix on 0.2.1.5-alpha. Possible fix for part of 813/868. Spotted by coderman
...
svn:r17569
2008-12-10 22:57:41 +00:00
Nick Mathewson
53d3f812bd
Add new internal-use-only option for controllers to use to prevent SIGHUP from reloading the configuration. Fixes bug 856.
...
svn:r17567
2008-12-10 22:17:02 +00:00
Nick Mathewson
9aa706e20c
Bug 691 fix: do not shutdown Tor servers right away if the network is down.
...
svn:r17566
2008-12-10 20:45:31 +00:00
Nick Mathewson
426b53d85a
Apply patch from Karsten to fix bug 879. Backport candidate.
...
svn:r17562
2008-12-10 18:16:58 +00:00
Nick Mathewson
7aa7d1a3e7
Give a better error when something has changed our descriptor cache out from under us. Based on patch from Karsten. Addresses bug 885.
...
svn:r17550
2008-12-10 03:01:26 +00:00
Roger Dingledine
d7bf7e0b32
When a directory authority gives us a new guess for our IP address,
...
log which authority we used. Hopefully this will help us debug
the recent complaints about bad IP address guesses.
svn:r17549
2008-12-10 01:46:51 +00:00
Roger Dingledine
4053b47459
note a potential bug in status events. need to look at spec to
...
see if it's really a bug.
svn:r17548
2008-12-10 01:35:21 +00:00
Roger Dingledine
145e589b6c
Resume using the correct "REASON=" stream when telling the
...
controller why we closed a stream. Bugfix in 0.2.1.1-alpha.
svn:r17547
2008-12-10 01:34:24 +00:00
Nick Mathewson
d60d8976b9
Better error message when told to setuid to ourself.
...
svn:r17543
2008-12-09 23:26:12 +00:00
Nick Mathewson
ab75c0d9e3
remove a bogus comment. Now that there is no undocumented synonym for EXTENDED_EVENTS, we do not need to point out that EXTENDED_EVENTS is documented
...
svn:r17542
2008-12-09 23:10:38 +00:00
Nick Mathewson
a7b4a7b9f8
Finally remove deprecated-since-0.1.2.4-alpha EXTENDED_FORMAT synonym for EXTENDED_EVENTS
...
svn:r17538
2008-12-09 19:55:19 +00:00
Nick Mathewson
3841e1b230
Bump version to 0.2.1.8-alpha-dev
...
svn:r17537
2008-12-09 18:18:48 +00:00
Nick Mathewson
0280a72500
Add a new status event for consensus arrival
...
svn:r17535
2008-12-09 18:16:41 +00:00
Nick Mathewson
07c8b2be21
Compile without warnings on mingw.
...
svn:r17522
2008-12-08 19:52:26 +00:00
Roger Dingledine
027a8cceed
bump to 0.2.1.8-alpha
...
svn:r17521
2008-12-08 19:25:18 +00:00
Nick Mathewson
b32bac88e8
Mark DirPortFrontPage as a FILENAME rather than a STRING. Right now this has no effect.
...
svn:r17520
2008-12-08 18:00:34 +00:00
Roger Dingledine
b1c8fb7058
this function is no longer used.
...
svn:r17515
2008-12-08 00:09:28 +00:00
Roger Dingledine
e5be0504ab
When the client is choosing entry guards, now it selects at most
...
one guard from a given relay family. Otherwise we could end up with
all of our entry points into the network run by the same operator.
Suggested by Camilo Viecco. Fix on 0.1.1.11-alpha.
Not a backport candidate, since I think this might break for users
who only have a given /16 in their reachableaddresses, or something
like that.
svn:r17514
2008-12-08 00:04:29 +00:00
Roger Dingledine
f31c16d993
Directory mirrors no longer fetch the v1 directory or
...
running-routers files. They are obsolete, and nobody asks for them
anymore. This is the first step to making v1 authorities obsolete.
svn:r17513
2008-12-07 23:53:39 +00:00
Jacob Appelbaum
48aca3c999
Small whitespace fix to properly format if () {} statement.
...
svn:r17503
2008-12-07 01:51:56 +00:00
Jacob Appelbaum
f70146ca91
This helps return a better error message when the file supplied to DirPortFrontPage is missing.
...
svn:r17502
2008-12-07 01:48:30 +00:00
Roger Dingledine
21892d8a9c
cleanups on r17500
...
svn:r17501
2008-12-07 01:34:45 +00:00
Jacob Appelbaum
6b178b46ef
New DirPortFrontPage option that takes an html file and publishes it as "/" on the DirPort. Now relay operators can provide a disclaimer without needin to set up a separate webserver. There's a sample disclaimer in contrib/tor-exit-notice.html.
...
svn:r17500
2008-12-07 01:21:19 +00:00
Jacob Appelbaum
cf75162a0c
Add comment clarifying OpenSSL usage.
...
svn:r17498
2008-12-07 01:14:49 +00:00
Nick Mathewson
6fb06f334a
Try to fix windows mmap code.
...
svn:r17493
2008-12-05 19:36:35 +00:00
Nick Mathewson
af03faa1a6
Fix more leaks in test_util_memarea().
...
svn:r17491
2008-12-05 02:25:39 +00:00
Nick Mathewson
7f793fa733
Simplify mmap object layout to avoid confusing static analysis tools, and us too.
...
svn:r17490
2008-12-05 02:17:41 +00:00
Nick Mathewson
475fbbbccc
Fix a resource leak in test_dir_formats()
...
svn:r17488
2008-12-05 02:05:39 +00:00
Nick Mathewson
1affbd3464
Split test_util_smartlist into manageable chunks; make them free memory properly.
...
svn:r17487
2008-12-05 01:58:35 +00:00
Nick Mathewson
30377823c3
Add a few more tests to our tests so that our tests make sense to coverity. CIDs 139, 138, 137.
...
svn:r17486
2008-12-05 01:49:15 +00:00
Nick Mathewson
e06442b648
Add a couple of sanity-checks for return values that coverity thinks we ought to have. CIDs 337, 335.
...
svn:r17485
2008-12-05 01:35:49 +00:00
Nick Mathewson
2be5215181
Fix a hard-to-trigger memory leak in log_credential status. Found by Coverity scan. CID 349.
...
svn:r17484
2008-12-05 01:29:59 +00:00
Nick Mathewson
a26188cee9
fix bug 880: find the end of an authority cert by looking for the first ----END SIGNATURE----- after the first dir-key-certification, not for the first ----END SIGNATURE. Harmless bug, but it made us non-spec-compliant.
...
svn:r17470
2008-12-03 03:42:19 +00:00
Nick Mathewson
37bd9181f0
Do not use O_APPEND on fd-based operations that do not really want it; have them just lseek instead.
...
svn:r17460
2008-12-02 23:49:40 +00:00
Roger Dingledine
96a185d9b7
style cleanup
...
svn:r17457
2008-12-02 23:42:21 +00:00
Nick Mathewson
bd6b3072f9
Change logging code to use fds instead of stdio. Fixes bug 861, and probably makes logging slightly faster. Not a backport candidate: bug 861 is too obscure and harmless.
...
svn:r17456
2008-12-02 23:36:58 +00:00
Nick Mathewson
6221bdd294
Add two lseek wrappers to compat.[ch]: one to return current fd position, and one to move the fd to the end of the file.
...
svn:r17454
2008-12-02 23:26:04 +00:00
Roger Dingledine
330218c7f7
#include "orconfig.h" in tor-checkkey.c to see if we can resolve
...
an obscure compile warning on solaris
svn:r17453
2008-12-02 23:13:40 +00:00
Nick Mathewson
9c65195449
Apply rovv's patch for bug 864: avoid null error on detached signature handling failure.
...
svn:r17446
2008-12-02 19:13:23 +00:00
Nick Mathewson
60738daf85
Define socklen_t before using it in compat.h
...
svn:r17444
2008-12-02 18:54:47 +00:00
Roger Dingledine
2d8f7a4ff6
clarify that 'resolve' relay cells nul-terminate the hostname, just
...
like 'begin' relay cells.
svn:r17442
2008-12-02 17:35:05 +00:00
Roger Dingledine
984dc51f26
clean up some log messages
...
svn:r17406
2008-11-29 11:55:30 +00:00
Nick Mathewson
191197eff7
Revert my older supposed gcc-4.4 warning workaround. GCC was not being needlessly prissy; it was hinting at the wrongly pure smartlist_bsearch_idx.
...
svn:r17396
2008-11-26 17:14:59 +00:00
Nick Mathewson
651a0a2fb5
Stop marking bsearch_idx as pure; it is not.
...
svn:r17393
2008-11-26 16:57:46 +00:00
Nick Mathewson
4cddcf8873
Cast uid_t and gid_t to unsigned before passing to printf %u.
...
svn:r17392
2008-11-26 16:13:12 +00:00
Nick Mathewson
bc597758dc
Use fcntl for file locking when flock() is not available.
...
svn:r17391
2008-11-26 16:10:56 +00:00
Roger Dingledine
a53ebd20f0
whitespace fix
...
svn:r17379
2008-11-24 02:02:48 +00:00
Nick Mathewson
c7910c3bc9
Consider GetNetworkParams() nameserver parsing to have suceeded if even one nameserver can be added. Log more useful info about what exactly is failing when we fail to add a nameserver.
...
svn:r17368
2008-11-22 21:46:34 +00:00
Nick Mathewson
07a08d933d
Resolve a warning under gcc 4.4 trunk.
...
svn:r17357
2008-11-22 02:19:14 +00:00
Roger Dingledine
0b7a2a505e
prepare_for_poll() -- plus its mysterious cousin, prepare_for_pool() --
...
are long gone.
svn:r17351
2008-11-21 14:07:57 +00:00
Nick Mathewson
bdc0aec00a
Update _log_global_min_severity after switch_logs_debug(), so that USR2 will work again. Bugfix on 0.1.2.8-beta. Spotted by Geoff Down.
...
svn:r17317
2008-11-17 19:58:51 +00:00
Nick Mathewson
0fa698d84f
apply sebastian's bug 867 fix: make routerset_equal() work as documented with NULL arguments
...
svn:r17287
2008-11-16 18:25:20 +00:00
Karsten Loesing
6d7951c022
Fix a possible segfault when establishing an exit connection. Bugfix on 0.2.1.5-alpha.
...
svn:r17275
2008-11-16 01:52:44 +00:00
Nick Mathewson
c36ddcbabf
Apparently sparc64 is way more strict about uint16_t access alignment than I had thought: it gave bus errors when messing with var-cell headers. Maybe this patch will fix bug 862.
...
svn:r17262
2008-11-12 14:41:44 +00:00
Nick Mathewson
a790a13705
define get_uint8 and set_uint8 macros to make code cleaner.
...
svn:r17261
2008-11-12 14:39:25 +00:00
Nick Mathewson
8f1952bf11
Be even _more_ careful when signatures are bogus.
...
svn:r17252
2008-11-11 17:14:12 +00:00
Nick Mathewson
3970c34f10
Only replace the detached signatures object when we actually added or replaced at least one signature.
...
svn:r17250
2008-11-11 16:52:07 +00:00
Nick Mathewson
997aea74dc
Fix from rovv: when adding a detached signature, do not automatically assume it is good just because we are adding it. We might also be adding it because it was the first signature we saw for a given voter.
...
svn:r17248
2008-11-11 16:35:46 +00:00
Nick Mathewson
00a90177fa
oops, remove debugging log message.
...
svn:r17247
2008-11-11 16:02:23 +00:00
Nick Mathewson
8157b8b766
be less aggressive about deleting expired certs. based on patch from rovv. partial fix for bug 854.
...
svn:r17246
2008-11-11 16:01:57 +00:00
Nick Mathewson
e08cbe2029
Add PURPOSE= field to getinfo circuit-status. With luck, controllers are ignoring extra fields (like they are supposed to) and this will not break any controllers.
...
svn:r17245
2008-11-11 15:59:24 +00:00
Nick Mathewson
a95e0e7355
apply sebastian's fix for bug 859. Apparently on win32 one must lock at least one byte when locking, but locking a nonexistant byte is okay. )
...
svn:r17244
2008-11-11 15:29:40 +00:00
Nick Mathewson
6c50ab6e61
Document a couple of functions.
...
svn:r17239
2008-11-10 20:40:01 +00:00
Roger Dingledine
c62d5f6a5c
beg nick for some documentation on the locking functions
...
svn:r17233
2008-11-10 00:48:13 +00:00
Roger Dingledine
0554e87f58
better error message when you set User but start tor as non-root.
...
hopefully will address bug 857.
svn:r17232
2008-11-10 00:41:07 +00:00
Roger Dingledine
4d8799b987
we missed a case when printing circuit purposes in circ events.
...
svn:r17230
2008-11-09 23:56:29 +00:00
Roger Dingledine
3dc433cc45
bump to 0.2.1.7-alpha-dev
...
svn:r17229
2008-11-09 23:32:38 +00:00
Nick Mathewson
13e079f9ec
Log a little more when credential-switching fails.
...
svn:r17228
2008-11-09 16:54:54 +00:00
Roger Dingledine
5d19fe5124
bump to 0.2.1.7-alpha
...
svn:r17217
2008-11-08 06:43:32 +00:00
Nick Mathewson
9f1e06bd0e
but to not attempt to download a specific certificate we already have.
...
svn:r17214
2008-11-07 15:01:49 +00:00
Nick Mathewson
bda4ca065c
Aaaaand, do not reset the download count just because we have a certificate that is listed in a consensus.
...
svn:r17212
2008-11-07 14:57:14 +00:00
Nick Mathewson
aa405f29e6
fix up signs in r17208
...
svn:r17211
2008-11-07 14:17:46 +00:00
Nick Mathewson
5e2cdc1666
When we get a duplicated certificate, treat it as a failure and increment the download count. Do not claim to be downloading certificates that we merely want.
...
svn:r17209
2008-11-07 14:01:44 +00:00
Nick Mathewson
a15bdd3edd
patch from karsten to not use or accept expired certs. fixes bug 851.
...
svn:r17208
2008-11-07 13:38:49 +00:00
Roger Dingledine
bc128c0b03
vidalia asks us for the value of the Group config option. but now
...
it's obsolete. which causes us to inform the user every time, even
though the user can't do anything about it other than get confused.
now it's an info-level log by default.
svn:r17206
2008-11-07 04:38:58 +00:00
Roger Dingledine
b32e600d50
while we're cleaning code, get rid of some unreachable code at
...
the bottom of switch_id
svn:r17205
2008-11-07 04:35:41 +00:00
Roger Dingledine
14773f42a7
now that we drop privs more thoroughly, switch_id() is no longer
...
idempotent. so now we remember if we've succeeded, and if so we
don't even try.
svn:r17204
2008-11-07 04:34:47 +00:00
Roger Dingledine
7c65792500
remove more redundant code from r17200
...
svn:r17203
2008-11-07 04:11:03 +00:00
Roger Dingledine
d27337bf17
i needed a piece of the 'patching patches' action too
...
svn:r17202
2008-11-07 03:39:19 +00:00
Nick Mathewson
1b98f45b3d
Developers should usually configure with --enable-gcc-warnings, and should regularly make check-spaces. Also, int fn() does not mean the same in C as it does in C++ or Java.
...
svn:r17201
2008-11-07 02:53:46 +00:00
Steven Murdoch
9d68ed08e9
Patch from Jacob Appelbaum and me to make User option more robust, properly set supplementary groups, deprecated the Group option, and log more information on credential switching
...
svn:r17200
2008-11-07 02:06:12 +00:00
Nick Mathewson
6e3de8530e
Remove bug 811/845 debugging code
...
svn:r17199
2008-11-07 01:50:37 +00:00
Nick Mathewson
a38026bb06
fix wide lines
...
svn:r17198
2008-11-07 01:48:55 +00:00
Nick Mathewson
3ebd1ebeca
The chunk_size field in memarea_t was never actually set. Remove the whole thing.
...
svn:r17195
2008-11-05 20:34:22 +00:00
Nick Mathewson
35bef7fefd
make read_all and write_all return ssize_t.
...
svn:r17194
2008-11-05 19:29:17 +00:00
Nick Mathewson
3f858b5b26
Fix a compile error found under pcc. It wants single-quites to be escaped in strings, it seems.
...
svn:r17191
2008-11-05 18:03:14 +00:00
Nick Mathewson
b56d1545db
Fix freebsd 7 compile by adding malloc_np.h header. Fix bug 850.
...
svn:r17190
2008-11-05 15:56:53 +00:00
Karsten Loesing
b31e2c2491
(a - b) / 2 != a - (b / 2); this is the reason why tunneled directory requests and client-side introduction circuits don't time out after the intended 30 seconds (task #847 ). Bugfix on r17106. Found by miner.
...
svn:r17189
2008-11-05 10:40:29 +00:00
Nick Mathewson
73c6cb8353
Fix unit test failure related to intro point parsing.
...
svn:r17188
2008-11-03 16:36:15 +00:00
Nick Mathewson
3f84ed3d46
Add a new memcmpstart to use instead of strcmpstart when the thing we are comparing is not nul-terminated.
...
svn:r17187
2008-11-03 16:35:48 +00:00
Nick Mathewson
7b45d530b0
Add some debugging logs for bug 811/845.
...
svn:r17186
2008-11-03 15:46:05 +00:00
Roger Dingledine
ebe4ef12b9
when building preemptive circuits, ignore streams that have a
...
chosen exit node in mind already. otherwise we get tricked into
trying to build a new circuit that will handle them.
svn:r17184
2008-11-03 07:00:56 +00:00
Roger Dingledine
3e5a584d37
fix the other half of r17091. now that best_support can be -1,
...
we were complaining about no support for our one-hop streams,
when in fact choose_good_exit_server_general() has no business
caring about one-hop streams. patch from miner.
svn:r17181
2008-11-01 23:49:14 +00:00
Nick Mathewson
c534b96e58
Fix an assertion failure on double-marked circuits, and a double-mark.
...
svn:r17179
2008-11-01 20:27:41 +00:00
Nick Mathewson
0c9dfffe5a
Implement the 0x20-hack to make DNS poisoning harder against us, especially when resolving large names. Add a cfg option to disable it, since apparently 3/10 of a percent of servers get it wrong.
...
svn:r17171
2008-10-29 19:20:02 +00:00
Nick Mathewson
c8a5e2d588
Work better with tools that resist DNS poisoning by using the 0x20 hack: make DNSPort replies perserve case.
...
svn:r17170
2008-10-29 15:31:26 +00:00
Nick Mathewson
361086005c
Fix a possible negative shift in address comparison. May fix bug 845 and bug 811
...
svn:r17169
2008-10-29 13:29:54 +00:00
Nick Mathewson
accb4a680f
make layer_hint check a little stricter.
...
svn:r17164
2008-10-27 16:57:18 +00:00
Nick Mathewson
ee31e0829e
Verify cpath_layer match on rendezvous cells too. Fixes another case of bug 446. Based on patch from rovv.
...
svn:r17162
2008-10-27 16:46:45 +00:00
Nick Mathewson
0ab45fee73
Document some dmalloc stuff and some stupid C tricks.
...
svn:r17161
2008-10-27 16:30:52 +00:00
Karsten Loesing
c53f1f83e7
gabelmoo has a new IP address.
...
svn:r17160
2008-10-27 15:04:45 +00:00
Jacob Appelbaum
7873d324df
This patch changes some of the code in util.c to refactor calls to
...
dmalloc_malloc, dmalloc_realloc and dmalloc_strdup. It only calls those
functions if we're using the magic USE_DMALLOC macro. If we're not doing
that, we call the normal malloc, realloc and strdup. This is my first
night at malloc disambiguation club, so I had to disambiguate. Also, first commit, I have my commit bit now. Huzzzah!!!
svn:r17157
2008-10-26 22:56:53 +00:00
Nick Mathewson
b166a43cb6
Fix another case of refusing to use a chosen exit node because we think it will reject _mostly_ everything. Based on patch from rovv. See bug 752.
...
svn:r17139
2008-10-21 17:09:04 +00:00
Nick Mathewson
5e762e6a5c
Fix the rest of bug 619: reject *:* servers should not do DNS lookups, even if broken clients send them RELAY_BEGIN cells. Patch from rovv.
...
svn:r17138
2008-10-21 16:51:59 +00:00
Nick Mathewson
b593fd5c20
Patch from rovv: send back END cell in response to connect attempts to nonexistent hidden service port.
...
svn:r17137
2008-10-21 16:41:20 +00:00
Roger Dingledine
bca46cc628
backport candidate:
...
The "ClientDNSRejectInternalAddresses" config option wasn't being
consistently obeyed: if an exit relay refuses a stream because its
exit policy doesn't allow it, we would remember what IP address
the relay said the destination address resolves to, even if it's
an internal IP address. Bugfix on 0.2.0.7-alpha; patch by rovv.
svn:r17135
2008-10-17 22:08:49 +00:00
Roger Dingledine
e3127e874e
fix grammar in a log message
...
svn:r17131
2008-10-16 17:13:28 +00:00
Roger Dingledine
bbf0f5a266
explain patch4 better. whee.
...
svn:r17111
2008-10-15 21:12:51 +00:00
Roger Dingledine
a5769eefa4
patch4 from proposal 155:
...
Hidden services start out building five intro circuits rather
than three, and when the first three finish they publish a service
descriptor using those. Now we publish our service descriptor much
faster after restart.
svn:r17110
2008-10-15 20:59:48 +00:00
Roger Dingledine
d06182f0bd
add patch2 from proposal 155:
...
Launch a second client-side introduction circuit in parallel
after a delay of 15 seconds (based on work by Christian Wilms).
svn:r17108
2008-10-15 18:52:06 +00:00
Roger Dingledine
4520500cde
put in karsten's patch #1 for proposal 155, modified
...
svn:r17106
2008-10-15 00:36:09 +00:00
Nick Mathewson
846e40d193
Patch from rovv: when we have no pending streams, choose exits with choose_good_exit_server_general() rather than with circuit_get_unhandled_ports() and friends. Bugfix on 0.1.1.x, at least.
...
svn:r17091
2008-10-14 17:05:52 +00:00
Roger Dingledine
d7cfa1f56c
Minor fix in the warning messages when you're having problems
...
bootstrapping; also, be more forgiving of bootstrap problems when
we're still making incremental progress on a given bootstrap phase.
svn:r17066
2008-10-13 03:34:29 +00:00
Roger Dingledine
c9bddb24b2
another coverity-found memory leak
...
svn:r17062
2008-10-12 03:21:05 +00:00
Roger Dingledine
95aace5aae
minor memory leak found by coverity
...
svn:r17061
2008-10-12 03:19:17 +00:00
Roger Dingledine
bb1f488dbe
fix typo in log entry
...
svn:r17050
2008-10-08 10:47:23 +00:00
Roger Dingledine
e7f5a07ff4
Make rend_cache_store() use the same return error codes as its v2
...
equivalent: I got a lonely "Failed to fetch rendezvous descriptor."
in my log file, even when the connection worked.
svn:r17028
2008-10-02 07:32:13 +00:00
Roger Dingledine
e24b812a32
time for another alpha-dev cycle
...
svn:r17023
2008-10-01 08:26:57 +00:00
Roger Dingledine
c7af43a624
Now NodeFamily and MyFamily config options allow spaces in
...
identity fingerprints, so it's easier to paste them in.
Suggested by Lucky Green.
svn:r17021
2008-10-01 03:41:33 +00:00
Nick Mathewson
ccede03cc0
Switch a should-benee-dless check for an assert.
...
svn:r17018
2008-09-30 13:59:12 +00:00
Roger Dingledine
a04baf14b6
bump to 0.2.1.6-alpha, and note that the exclude*nodes config
...
discussion hasn't finished.
svn:r17011
2008-09-30 09:37:18 +00:00
Roger Dingledine
f2708dd40f
a few more tweaks
...
svn:r17010
2008-09-30 09:32:26 +00:00
Roger Dingledine
49a250b208
i *think* this is equivalent. somebody should check me on it though.
...
svn:r17009
2008-09-30 08:45:40 +00:00
Roger Dingledine
7247838a25
v3 authorities write down all the votes they used for the consensus
...
to the datadir, for debugging.
svn:r17008
2008-09-29 23:13:43 +00:00
Nick Mathewson
25f8335528
Include circuit purposes in circuit events. Now all circuit events are extended; this makes the code simpler.
...
svn:r17007
2008-09-29 22:34:22 +00:00
Nick Mathewson
9d950f7d25
Nobody calls circuit_launch_by_nickname; remove it.
...
svn:r17006
2008-09-29 20:44:29 +00:00
Roger Dingledine
26aa741169
Remove the old v2 directory authority 'lefkada' from the default
...
list. It has been gone for many months.
svn:r17005
2008-09-29 19:27:20 +00:00
Nick Mathewson
ae3ce7b387
Patch from mwenge: update TrackHostExits mapping expiry times when the mappings are used, so that they expire a while after their last use, not a while after their creation.
...
svn:r17004
2008-09-29 14:53:53 +00:00
Nick Mathewson
57db1c1a7d
Tweak the dbg-stability.txt code to log everything else that influences router stability calculations.
...
svn:r17003
2008-09-29 14:40:34 +00:00
Nick Mathewson
ee0078ead4
Make tor-resolve take a -p port option in addition to the current host:port syntax.
...
svn:r17002
2008-09-29 14:18:47 +00:00
Roger Dingledine
9678f166a8
If we have correct permissions on $datadir, we complain to stdout
...
and fail to start. But dangerous permissions on
$datadir/cached-status/ would cause us to open a log and complain
there. Now complain to stdout and fail to start in both cases. Fixes
bug 820, reported by seeess.
svn:r16998
2008-09-29 10:09:05 +00:00
Roger Dingledine
c846979ab7
Fix a bug where an unreachable relay would establish enough
...
reachability testing circuits to do a bandwidth test -- if
we already have a connection to the middle hop of the testing
circuit, then it could establish the last hop by using the existing
connection. Bugfix on 0.1.2.2-alpha, exposed when we made testing
circuits no longer use entry guards in 0.2.1.3-alpha.
svn:r16997
2008-09-29 09:36:42 +00:00
Nick Mathewson
99755f374d
Fix 0/0 calculation in get_weighted_fractional_uptime().
...
svn:r16994
2008-09-28 15:48:36 +00:00
Nick Mathewson
bb1685318c
Commit fix for bug 807 from mwenge: send CLOSED controller event for reverse dns resolve, not FAILED.
...
svn:r16985
2008-09-26 20:25:35 +00:00
Nick Mathewson
745e5b0e22
Make sure ExcludeSingleHopRelays works for an exit.
...
svn:r16984
2008-09-26 19:09:12 +00:00
Nick Mathewson
e147e867be
Proposal 152 implementation from Josh Albrecht, with tweaks.
...
svn:r16983
2008-09-26 18:58:45 +00:00
Nick Mathewson
87eb230c01
Put the start-of-downtime value in the start-of-downtime buffer so that we do not put junk in the dbg-stability.txt file
...
svn:r16982
2008-09-26 18:31:22 +00:00
Nick Mathewson
e7e12236ac
Code to serve a current stability calculations from /tor/dbg-stability.txt. Untested: somebody please run this on an authority and let me know if it is broken.
...
svn:r16981
2008-09-26 18:02:48 +00:00
Nick Mathewson
283b95e463
Make tests pass again by adding an opt hidden-service-dir to the example routerinfo output.
...
svn:r16980
2008-09-26 17:58:35 +00:00
Nick Mathewson
ae33d3ead7
Apply rovv's fix for bug 824.
...
svn:r16975
2008-09-26 15:30:26 +00:00
Nick Mathewson
02c71a7eb4
Widen the conditions under which we whine about not having a geoip file to include "a country code was configured in a node list."
...
svn:r16968
2008-09-25 21:06:32 +00:00
Nick Mathewson
e06f140f97
Whitespace fixes.
...
svn:r16967
2008-09-25 20:22:17 +00:00
Nick Mathewson
8bbbbaf87b
Add country-code support to configured node lists to implement the ever-popular "no exits in Monaco" feature (ExcludeExitNodes {MC}). Also allow country codes and IP ranges in ExitNodes. (EntryNodes needs more work.) Based on code by Robert Hogan. Needs more testing.
...
svn:r16966
2008-09-25 20:21:35 +00:00
Nick Mathewson
b2c7090da6
Make it easier for dmalloc to see if keys are leaking; remove a test-only key leak.
...
svn:r16965
2008-09-25 17:37:00 +00:00
Nick Mathewson
06f96363fd
Remove now-needless _tor_dmalloc_free helper.
...
svn:r16964
2008-09-25 17:36:09 +00:00
Nick Mathewson
a7e383af19
More test memory-management fixes
...
svn:r16963
2008-09-25 15:20:38 +00:00
Karsten Loesing
f2ff3e74ae
All relays now store and serve v2 hidden service descriptors by default (not only directory mirrors).
...
svn:r16961
2008-09-24 22:33:47 +00:00
Karsten Loesing
9a7098487b
If we are not using BEGIN_DIR cells, don't attempt to contact hidden service directories with non-open dir port.
...
svn:r16960
2008-09-24 22:29:22 +00:00
Nick Mathewson
7f805aca2b
Split test_crypto() into manageable pieces.
...
svn:r16959
2008-09-24 20:55:38 +00:00
Karsten Loesing
5f457e4fa6
Minor correction of commentation.
...
svn:r16958
2008-09-24 17:33:07 +00:00
Nick Mathewson
8bc1536a9e
Add patch 4 from Karsten for proposal 121, slightly modified. Karsten should definitely re-review the bits I changed.
...
svn:r16955
2008-09-24 14:44:29 +00:00
Roger Dingledine
982a22a121
fix typo
...
svn:r16949
2008-09-24 00:49:29 +00:00
Nick Mathewson
75977fd79b
Patch from roger for 752, but with more comments: When we get an A.B.exit:P address, and B would reject most connections to P, but we do not know whether it would allow A, then allow the connection to procede. Bugfix, amusingly, on 0.0.9rc5.
...
svn:r16944
2008-09-23 20:25:01 +00:00
Nick Mathewson
545b317e1f
Fix for bug 797 (by arma, with tweaks): always use create_fast for circuits where we do not know an onion key.
...
svn:r16942
2008-09-23 20:13:23 +00:00
Nick Mathewson
f28fc83ea5
More logging for mtbf/wfu calculations.
...
svn:r16941
2008-09-23 18:24:20 +00:00
Roger Dingledine
29abfab8bf
Update to the "September 1 2008" ip-to-country file.
...
svn:r16940
2008-09-23 09:51:05 +00:00
Karsten Loesing
e4942e809e
Exclude v0 rendezvous descriptors when considering republication.
...
svn:r16939
2008-09-23 09:30:57 +00:00
Roger Dingledine
6a7abbd25d
ok, but inaccurate error strings worse
...
svn:r16938
2008-09-23 08:57:30 +00:00
Roger Dingledine
0fc0d5266c
identical error strings in different contexts bad
...
svn:r16937
2008-09-23 08:54:03 +00:00
Nick Mathewson
b0c48d8e45
Oops; we need to make sure that DNS request names are matched in the _questions_ section of the replies. Rejecting answers whether the _answers_ section did not match made us reject A records waiting at the end of a CNAME record. Bug 823.
...
svn:r16933
2008-09-22 20:06:25 +00:00
Roger Dingledine
4fd9880540
give rend_client_desc_here a slightly more accurate name
...
svn:r16916
2008-09-16 10:26:15 +00:00
Roger Dingledine
38f2272d5d
patch from karsten for bug 814. whew.
...
svn:r16915
2008-09-16 10:17:04 +00:00
Nick Mathewson
3db8c15287
Add a circuit_conforms_to_options() function for use in debugging paths [and inother stuff too]. Untested, and so far unused.
...
svn:r16914
2008-09-15 22:29:47 +00:00
Roger Dingledine
2bde30efa6
read_to_buf should take an int *error_socket and return it.
...
svn:r16909
2008-09-14 08:35:41 +00:00
Roger Dingledine
7f2fd34645
stop telling us every time we fetch a consensus. that's not really news.
...
svn:r16908
2008-09-14 07:17:44 +00:00
Roger Dingledine
dbb481c169
Serve the latest v3 networkstatus consensus via the control
...
port. Use "getinfo dir/status-vote/current/consensus" to fetch it.
svn:r16907
2008-09-14 04:07:29 +00:00
Roger Dingledine
4045ef72f5
make it explicit that the uncompressed cached dir items are nul-terminated
...
(they are, but now we should keep them that way)
svn:r16906
2008-09-14 03:36:54 +00:00
Roger Dingledine
2d95accc75
Allow ports 465 and 587 in the default exit policy again. We had
...
rejected them in 0.1.0.15, because back in 2005 they were commonly
misconfigured and ended up as spam targets. We hear they are better
locked down these days.
svn:r16898
2008-09-13 10:04:42 +00:00
Karsten Loesing
f0a5ef804f
Directory mirrors store and serve v2 hidden service descriptors by default.
...
svn:r16858
2008-09-11 20:06:04 +00:00
Nick Mathewson
b322348e8a
Fix more actual test leaks
...
svn:r16831
2008-09-10 05:34:03 +00:00
Nick Mathewson
45205126fe
Fix some apparent leaks in voting. If authorities suddenly start segfaulting, this could be a patch to look harder at.
...
svn:r16830
2008-09-10 05:33:49 +00:00
Nick Mathewson
aa69d586ea
Make buffer unit tests handle resource leaks properly.
...
svn:r16823
2008-09-10 00:16:32 +00:00
Nick Mathewson
38f56608d9
Make more unit tests handle resource leaks properly.
...
svn:r16822
2008-09-10 00:11:53 +00:00
Karsten Loesing
52fbfc5d45
Correct indentation.
...
svn:r16819
2008-09-09 22:19:41 +00:00
Roger Dingledine
659f1651e0
tweak karsten's patch
...
svn:r16818
2008-09-09 21:09:15 +00:00
Roger Dingledine
2c14705a4d
patch from karsten to fix more of bug 767
...
svn:r16817
2008-09-09 21:08:02 +00:00
Nick Mathewson
f95d7c189b
Refactor unit test macros and tor_free_all() logic a bit so as to make it easier to free memory on failing tests, in order to suppress scanner warnings and to make dmalloc() usable with tests.
...
svn:r16816
2008-09-09 20:43:31 +00:00
Nick Mathewson
6c432a5565
Replace the dummy-use var in SMARTLIST_FOREACH_END() with one that is less likely to confuse analysis tools into thinking we do use after free. Arguably, (void)x should count as use in suppressing unused variable warnings, but not in generating hey-you-used-a-variable warnings. Arguably, though, it shouldn't.
...
svn:r16815
2008-09-09 19:29:33 +00:00
Roger Dingledine
fa64d8041f
minor cleanups on karsten's patch
...
svn:r16810
2008-09-09 09:21:21 +00:00
Roger Dingledine
ef7af1d61e
karsten's patch for bug 767.
...
svn:r16808
2008-09-09 08:41:58 +00:00
Roger Dingledine
d37fae2f4e
Catch and report a few more bootstrapping failure cases when Tor
...
fails to establish a TCP connection. Cleanup on 0.2.1.x.
svn:r16803
2008-09-09 06:25:39 +00:00
Nick Mathewson
aacda9cd8e
We should not alter an addr_policy_t that has been canonicalized.
...
svn:r16802
2008-09-09 03:48:01 +00:00
Nick Mathewson
baeb260ad1
Refactor use of connection_new so that we get more verifiable typesafety.
...
svn:r16785
2008-09-05 22:09:44 +00:00
Nick Mathewson
339f094056
Refactor some code and add some asserts based on scanner results.
...
svn:r16783
2008-09-05 21:19:53 +00:00
Nick Mathewson
a345506672
Add an assert to make tools happier.
...
svn:r16782
2008-09-05 20:59:09 +00:00
Nick Mathewson
d5b2dab31d
Fix a malloc that should have been a tor_malloc
...
svn:r16780
2008-09-05 20:53:39 +00:00
Nick Mathewson
0b8117a5c0
Fix numerous memory leaks: some were almost impossible to trigger, and some almost inevitable.
...
svn:r16779
2008-09-05 20:52:15 +00:00
Nick Mathewson
4d94e061c7
Clean up some redundant stuff in crypto_dh_new().
...
svn:r16778
2008-09-05 20:18:22 +00:00
Nick Mathewson
a56a072f29
It is probably some kind of misdeed to say for (i=0;i<2;++i) { A=i?x:y; foo(bar(A)); } rather than foo(bar(x)); foo(bar(y)); . Also, it can confuse tools.
...
svn:r16777
2008-09-05 20:04:27 +00:00
Nick Mathewson
a6ea2b056a
Fix a memory leak in tor-gencert.c
...
svn:r16776
2008-09-05 19:55:04 +00:00
Nick Mathewson
8ea780632f
Make severity args to add_*_log() functions be const
...
svn:r16775
2008-09-05 19:52:44 +00:00
Nick Mathewson
c33dde4ac1
Fix mingw build with --enable-gcc-warnings set.
...
svn:r16759
2008-09-04 21:58:09 +00:00
Nick Mathewson
fa2f72ded7
An asterisk makes a difference sometimes. Fixes bug 809.
...
svn:r16758
2008-09-04 20:42:02 +00:00
Nick Mathewson
3f2b7078d2
Use warn_too_many_conns() when accept() fails with a resource limit.
...
svn:r16751
2008-09-04 15:22:55 +00:00
Roger Dingledine
ed45a42f98
take out the crazy line from last night that made no sense. apparently
...
it does work for tas after all.
svn:r16724
2008-09-01 21:24:25 +00:00
Roger Dingledine
9f823f54d5
remove some redundant includes. i expect the first one to be a problem
...
for tas, but who knows.
svn:r16723
2008-09-01 21:16:07 +00:00
Nick Mathewson
f80ac31d74
Add a lockfile to the Tor data directory to avoid situations where two Tors start with the same datadir, or where a --list-fingerprints races with a server to create keys, or such.
...
svn:r16722
2008-09-01 20:06:26 +00:00
Roger Dingledine
6a29ad853b
bump to 0.2.1.5-alpha-dev
...
svn:r16715
2008-09-01 08:09:31 +00:00
Roger Dingledine
04eded4a5c
take out a line that i think is extraneous. come on, what could
...
go wrong?
svn:r16714
2008-09-01 08:01:40 +00:00
Roger Dingledine
6942bd66ea
Fix compile on OpenBSD 4.4-current. Bugfix on 0.2.1.5-alpha.
...
Reported by Tas.
svn:r16713
2008-09-01 08:01:22 +00:00
Roger Dingledine
e5576a66dd
bump to 0.2.1.5-alpha
...
svn:r16708
2008-08-31 22:33:33 +00:00
Roger Dingledine
cfff21e78a
backport candidate:
...
If not enough of our entry guards are available so we add a new
one, we might use the new one even if it overlapped with the
current circuit's exit relay (or its family). Anonymity bugfix
pointed out by rovv.
svn:r16698
2008-08-31 06:33:39 +00:00
Nick Mathewson
32549ad95e
Double oops: revert accidentally committed local geoipc.c debugging hack.
...
svn:r16687
2008-08-29 17:02:26 +00:00
Nick Mathewson
730f1b6d3f
Oops. Make warn_too_many_conns() actually work.
...
svn:r16686
2008-08-29 17:01:15 +00:00
Roger Dingledine
4eab76f074
remove a code path that should never happen (and if it did, we'd be
...
complaining about an errno set from some arbitrary previous problem).
svn:r16684
2008-08-29 09:06:18 +00:00
Nick Mathewson
6bf1dec945
Oops; set address families on nameservers.
...
svn:r16674
2008-08-27 14:12:10 +00:00
Roger Dingledine
5d73e37519
and then make the indentation right
...
svn:r16663
2008-08-26 19:13:54 +00:00
Roger Dingledine
845d2c26b4
fix typos from jake's patch earlier (one pointed out by fabian, thanks!)
...
svn:r16662
2008-08-26 19:13:24 +00:00
Nick Mathewson
2625eb204f
Fix a memory leak when freeing routerstatuses with exit policy summaries. Patch from mwenge.
...
svn:r16659
2008-08-25 23:19:58 +00:00
Roger Dingledine
8b4e9ba02c
and make it compile with warnings on
...
svn:r16658
2008-08-25 21:02:44 +00:00
Roger Dingledine
c5fef3c57f
commit jake's patch to include strings with socks5 error numbers
...
svn:r16657
2008-08-25 21:02:22 +00:00
Roger Dingledine
8a9b6204ca
get rid of some magic constants i found while walking
...
jake through socks4 and socks5 failure codes
svn:r16651
2008-08-25 07:06:55 +00:00
Nick Mathewson
239cbe99ba
Oops. Linux has no sa_len field.
...
svn:r16627
2008-08-22 18:00:26 +00:00
Nick Mathewson
88e6162649
r17848@tombo: nickm | 2008-08-22 12:10:11 -0400
...
Make definition of tor_mutex_t go into compat.h, so that it is possible to inline mutexes in critical objects. Add init/uninit functions for mutexes allocated inside other structs.
svn:r16623
2008-08-22 16:24:52 +00:00
Nick Mathewson
0800b332a0
r17847@tombo: nickm | 2008-08-22 12:08:56 -0400
...
ipv6: make server-side dns cache remember for each address an ipv6 addr and an ipv4 addr. This fix is just the struct side.
svn:r16622
2008-08-22 16:24:47 +00:00
Nick Mathewson
fc52d85b7c
r17846@tombo: nickm | 2008-08-22 11:54:00 -0400
...
Make dns resolver code more robust: handle nameservers with IPv6 addresses, make sure names in replies match requested names, make sure origin address of reply matches the address we asked.
svn:r16621
2008-08-22 16:24:43 +00:00
Roger Dingledine
8f5642edbc
Relays now reject risky extend cells: if the extend cell includes
...
a digest of all zeroes, or asks to extend back to the relay that
sent the extend cell, tear down the circuit. Ideas suggested
by rovv.
svn:r16605
2008-08-20 05:21:43 +00:00
Roger Dingledine
cc8b2247bf
make r16598 compile on 64-bit too
...
svn:r16604
2008-08-20 05:15:08 +00:00
Karsten Loesing
a8035b5fc3
Update doxygen documentation.
...
svn:r16599
2008-08-19 19:01:41 +00:00
Nick Mathewson
24f1d29be1
Apply proposal 121 patch 3, with minor tweaks and a few comments.
...
svn:r16598
2008-08-19 15:41:28 +00:00
Nick Mathewson
0711408c22
Adjust definition of SMARTLIST_FOREACH_END() to enforce matching variable.
...
svn:r16597
2008-08-19 15:33:03 +00:00
Peter Palfrader
87a5962abb
All the controller things want their stuff in v2 format. Well then, maybe that's already sufficient
...
svn:r16578
2008-08-17 08:26:02 +00:00
Peter Palfrader
d3be2cb7fb
And tell us more in another error case
...
svn:r16577
2008-08-17 08:14:57 +00:00
Peter Palfrader
ab9078fca0
Change a warning/bug message
...
svn:r16576
2008-08-17 08:11:21 +00:00
Peter Palfrader
3c0b0ccca9
Two consensus fixes: always reset has_* to 0, and use a buffer of proper length for exitsummaries.
...
svn:r16575
2008-08-17 08:01:23 +00:00
Peter Palfrader
4eecd27b42
Make trunk build again under -DEXPORTMALLINFO
...
svn:r16559
2008-08-15 14:03:37 +00:00
Nick Mathewson
fcf817f897
Switch global_identifier on connections to a 64-bit field and move it to connection_t. When procession onionskins, look up the connection by this field rather than by addr:port. This will keep us from dropping onionskins. How many dropped circuits are dropped because of this bug?
...
svn:r16558
2008-08-15 13:55:01 +00:00
Peter Palfrader
521f8c791f
spaceman
...
svn:r16555
2008-08-14 23:09:48 +00:00
Peter Palfrader
8cc3d6e22d
Add exitpolicy summaries to the consensus
...
svn:r16554
2008-08-14 23:01:31 +00:00
Peter Palfrader
e27b448c57
Do not split stored exit policy summary into type(accept/reject) and portlist. At least not just yet
...
svn:r16553
2008-08-14 23:01:21 +00:00
Peter Palfrader
41730a893c
Rename a field so weasel likes it better
...
svn:r16552
2008-08-14 23:01:09 +00:00
Peter Palfrader
ceae7ed960
Add bw to consensus
...
svn:r16551
2008-08-14 23:00:57 +00:00
Peter Palfrader
82f8050ac4
Parse policies and weight (bw) into routerstatuses
...
svn:r16550
2008-08-14 23:00:44 +00:00
Peter Palfrader
e8de3ff54d
If we are lucky the whitespace nazis will not have noticed these things yet
...
svn:r16549
2008-08-14 18:01:20 +00:00
Peter Palfrader
fdba26f213
minor comment/doxygen fix
...
svn:r16548
2008-08-14 18:01:09 +00:00
Peter Palfrader
7c4106135a
Give bw in kb/sec in votes/consensus
...
svn:r16544
2008-08-14 12:37:59 +00:00
Peter Palfrader
ff32708d0e
Having a reject-all policy summarized with a lack of summary is stupid. Explicitly mention them as reject 1-65535.
...
svn:r16543
2008-08-14 12:37:50 +00:00
Peter Palfrader
2f91a3528a
testsuite: Now that we add (pretty useless, but still) routerinfos to the routerlist for every one of our routerstatuses in the votes we pass again. yay
...
svn:r16542
2008-08-14 12:37:42 +00:00
Peter Palfrader
6317cc2956
Only fetch the routerinfo_t in routerstatus_format_entry() if we are going to need it
...
svn:r16541
2008-08-14 12:37:34 +00:00
Peter Palfrader
a6ade97f67
Properly move forward char pointer after appending stuff to the string
...
svn:r16540
2008-08-14 12:37:28 +00:00
Peter Palfrader
056157984b
Disable test suite for today
...
svn:r16539
2008-08-14 12:37:21 +00:00
Peter Palfrader
b246c4de9b
asserting(s) is better than segfaulting if it turns out to be NULL later
...
svn:r16538
2008-08-14 12:37:14 +00:00
Peter Palfrader
1a2c6b41e3
Do not show policy and bw in v2 statuses
...
svn:r16537
2008-08-14 12:37:07 +00:00
Peter Palfrader
24da63ea7b
Add exit policy and bw to dirvotes - unfortunately also to v2 statuses
...
svn:r16536
2008-08-14 12:37:00 +00:00
Peter Palfrader
91f654f2ff
This bunch of functions really should be static
...
svn:r16535
2008-08-14 11:24:03 +00:00
Peter Palfrader
171a7d4b0f
Fix an overflow when counting rejects for *, truncate exit summaries after 1000 chars
...
svn:r16530
2008-08-13 19:25:18 +00:00
Peter Palfrader
adcea0f332
Think of the poor children in Antarctica who still have to work on 4" screens
...
svn:r16528
2008-08-13 12:46:13 +00:00
Peter Palfrader
0d807068a3
A few testcases for policy summaries
...
svn:r16527
2008-08-13 12:46:06 +00:00
Peter Palfrader
c4e8fe11db
Also special case "accept 1-65535" case, do not leak in non-exit case
...
svn:r16526
2008-08-13 12:46:00 +00:00
Peter Palfrader
8ef2fe4b37
Return NULL for policies that do not allow any exits
...
svn:r16525
2008-08-13 12:45:53 +00:00
Peter Palfrader
4a74b9a7df
Fix condition statement for accept items, fix two asserts
...
svn:r16524
2008-08-13 12:45:44 +00:00
Peter Palfrader
34e083dde1
Make sure we don't run off the end of the list
...
svn:r16523
2008-08-13 12:45:34 +00:00
Peter Palfrader
b2344a9e4d
Move policy_summarize() prototype to or.h
...
svn:r16522
2008-08-13 12:45:28 +00:00
Peter Palfrader
49a616e0fa
Create string representation of exit summaries
...
svn:r16521
2008-08-13 12:45:23 +00:00
Peter Palfrader
7eaf5bd848
Nickm says I'm going to hell, but if I write that in a comment he might just save my soul
...
svn:r16520
2008-08-13 12:45:15 +00:00
Peter Palfrader
1adc12546e
implement policy_summary_accept and policy_summary_reject together with a set of helpers
...
svn:r16519
2008-08-13 12:45:09 +00:00
Peter Palfrader
f5adde1a17
Start with exit policy summaries
...
svn:r16518
2008-08-13 12:45:01 +00:00
Nick Mathewson
97245376d9
Next patch from Karsten: client-side configuration stuff for proposal 121.
...
svn:r16510
2008-08-12 16:12:26 +00:00
Nick Mathewson
30422b5df1
Rate-limit "too-many-sockets" messages; they can get needlessly verbose.
...
svn:r16480
2008-08-09 15:35:37 +00:00
Nick Mathewson
60a0ae198d
Patch cleanups from karsten
...
svn:r16479
2008-08-09 15:13:28 +00:00
Nick Mathewson
7994f49d43
Fix bug in my changes to karsten's patch
...
svn:r16477
2008-08-08 16:45:22 +00:00
Nick Mathewson
a8ddac96d8
handle ipv6 in socks5 requests.
...
svn:r16476
2008-08-08 16:41:59 +00:00
Nick Mathewson
22259a0877
The first of Karsten's proposal 121 patches: configure and maintain client authorization data. Tweaked a bit: see comments on or-dev.
...
svn:r16475
2008-08-08 14:36:11 +00:00
Nick Mathewson
f6879caa04
Try once again to make BSD compilation happy.
...
svn:r16474
2008-08-08 12:58:17 +00:00
Nick Mathewson
39f88641c1
r17692@tombo: nickm | 2008-08-07 22:41:26 -0400
...
Fix more compile errors on BSD pf stuff. How about now?
svn:r16472
2008-08-08 02:41:34 +00:00
Nick Mathewson
5ab6fe0051
r17680@tombo: nickm | 2008-08-07 16:06:30 -0400
...
Add a missing safe_str for a debug_log_message. Fix the bad part of bug 674.
svn:r16462
2008-08-07 20:06:40 +00:00
Nick Mathewson
b81d70addb
Oops. On recent linux kernels we were not detecting the linux/netfilter_ipv4.h header properly, since we needed to have in_addr and in6_addr and __u32 defined before trying to include it. Fix that.
...
svn:r16460
2008-08-07 19:39:52 +00:00
Nick Mathewson
48848537bc
r17667@tombo: nickm | 2008-08-07 15:13:30 -0400
...
Make the TransPort input code handle IPv6 addresses, I hope. This code may not compile. Possibly fix bug 796.
svn:r16459
2008-08-07 19:13:39 +00:00
Nick Mathewson
d9601c65e0
r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
...
Make tor_addr_from_sockaddr also give away the port in a useful format
svn:r16458
2008-08-07 19:13:35 +00:00
Nick Mathewson
635f3c8aee
r17664@tombo: nickm | 2008-08-06 12:32:09 -0400
...
Patch from Christopher Davis: open /dev/pf before dropping privileges. Fixes bug 782. Backport candidate.
svn:r16450
2008-08-06 16:32:17 +00:00
Nick Mathewson
2905291af2
r17659@tombo: nickm | 2008-08-06 12:22:11 -0400
...
Fix bug 794: recover 3 bytes wasted per memory chunk. Fix from rovv.
svn:r16447
2008-08-06 16:22:25 +00:00
Roger Dingledine
b79fe6a0db
bump to 0.2.1.4-alpha-dev, add a future todo item
...
svn:r16440
2008-08-05 23:33:43 +00:00
Nick Mathewson
9855c1d06f
r17645@31-33-44: nickm | 2008-08-05 16:28:01 -0400
...
Make unspecified addresses also cause connection_is_rate_limited to say 0.
svn:r16437
2008-08-05 20:28:03 +00:00
Nick Mathewson
645cbd690b
r17643@31-33-44: nickm | 2008-08-05 16:18:25 -0400
...
Oops. Remove code to set (nonportable) sin_len fields. Added it to try to fix a bug that turned out to be something else.
svn:r16436
2008-08-05 20:18:28 +00:00
Nick Mathewson
960a0f0a99
r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
...
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you.
svn:r16435
2008-08-05 20:08:19 +00:00
Peter Palfrader
0cfb68454e
Document that we break ties in favor of smaller SD digest if there are still ties after comparing the published timestamp
...
svn:r16432
2008-08-05 18:54:23 +00:00
Roger Dingledine
d01813a8dd
Take out the TestVia config option, since it was a workaround for
...
a bug that was fixed in Tor 0.1.1.21.
svn:r16409
2008-08-05 00:12:05 +00:00
Roger Dingledine
18d3153fbb
get closer to a release
...
svn:r16408
2008-08-05 00:00:35 +00:00
Roger Dingledine
d5bb361977
minor fixes
...
svn:r16407
2008-08-04 23:59:38 +00:00
Karsten Loesing
d166b9dc45
Make check-spaces happy.
...
svn:r16406
2008-08-04 23:39:07 +00:00
Roger Dingledine
2a417700b4
don't log-warn on a bootstrapping status event if the recommendation
...
is to ignore.
svn:r16405
2008-08-04 23:38:32 +00:00
Karsten Loesing
1fe07f66f4
In some edge cases it occurs that the router descriptor of a previously picked introduction point becomes obsolete. In that case, don't stick to using that introduction point, but simply give up on it. Reverts some part of r15825.
...
svn:r16404
2008-08-04 23:35:12 +00:00
Karsten Loesing
ff9c3c006f
Remove dead code that was left from marking HiddenService(Exclude)Nodes obsolete in task 754.
...
svn:r16401
2008-08-04 22:42:27 +00:00
Karsten Loesing
3c9cd463d2
Fix a false assertion when extending a circuit to a relay to which a connection is already established. In that case the circuit should not need to memorize extend info for that relay. circuitbuild.c:389 contains a similar assertion.
...
svn:r16375
2008-08-03 17:45:24 +00:00
Karsten Loesing
ee44eadf4c
Fix a bug when generating router descriptors: The address part of exit policies was uninitialized.
...
svn:r16372
2008-08-03 12:43:18 +00:00
Roger Dingledine
fd4a30d198
bump to 0.2.1.3-alpha
...
svn:r16369
2008-08-03 05:35:42 +00:00
Roger Dingledine
bf066be654
note a feature (bugfix) we should do one day
...
svn:r16368
2008-08-03 05:35:18 +00:00
Nick Mathewson
1a76cd179a
When a struct ends with char a[1], the size of all earlier members of the struct is _not_ sizeof(st)-1; compilers add alignment. Problem spotted by rovv. Backport candidate.
...
svn:r16302
2008-07-31 12:18:14 +00:00
Karsten Loesing
626fafe563
Make compiler with GCC warnings enabled happy.
...
svn:r16300
2008-07-31 10:33:02 +00:00
Nick Mathewson
186097906d
r17436@tombo: nickm | 2008-07-30 09:03:19 -0400
...
Move n_addr, n_port, and n_conn_id_digest fields of circuit_t into a separately allocated extend_info_t. Saves 22 bytes per connected circuit_t on 32-bit platforms, and makes me more comfortable with using tor_addr_t in place of uint32_t n_addr.
svn:r16257
2008-07-30 13:04:32 +00:00
Nick Mathewson
f366d10a2f
r17435@tombo: nickm | 2008-07-30 08:50:54 -0400
...
Allow alternate form of SMARTLIST_FOREACH with paired BEGIN and END macros. This lets the compiler tell us which line an error has occurred on.
svn:r16256
2008-07-30 13:04:28 +00:00
Nick Mathewson
e5bc5f11b8
r17434@tombo: nickm | 2008-07-29 10:58:36 -0400
...
Refactor tor_addr_from_string: it didnt need most of parse_addr_mask_port_range, and its dependence on that latter function made it less flexible.
svn:r16255
2008-07-30 13:04:26 +00:00
Nick Mathewson
507b01357a
r17426@tombo: nickm | 2008-07-28 20:34:03 -0400
...
More test coverage for tor_addr_t; fix a couple of bugs.
svn:r16234
2008-07-29 00:34:50 +00:00
Nick Mathewson
056d97da0c
r17391@pc-10-8-1-079: nickm | 2008-07-25 17:11:17 +0200
...
Tor_addr_compare did a semantic comparison, such that ::1.2.3.4 and 1.2.3.4 were "equal". we sometimes need an exact comparison. Add a feature to do that.
svn:r16210
2008-07-25 15:11:21 +00:00
Nick Mathewson
016adc9a08
r17359@pc-10-8-1-079: nickm | 2008-07-25 16:42:48 +0200
...
whitespace fixes
svn:r16209
2008-07-25 14:47:19 +00:00
Nick Mathewson
9da0482007
r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200
...
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much.
svn:r16208
2008-07-25 14:43:24 +00:00
Nick Mathewson
3ce6e2fba2
r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200
...
Make generic address manipulation functions work better. Switch address policy code to use tor_addr_t, so it can handle IPv6. That is a good place to start.
svn:r16178
2008-07-24 13:44:04 +00:00
Nick Mathewson
ed781e6971
r17338@aud-055: nickm | 2008-07-24 11:21:06 +0200
...
Refactor the router_choose_random_node interface: any function with 10 parameters, most of which are boolean and one of which is unused, should get refactored like this.
svn:r16167
2008-07-24 09:22:34 +00:00
Nick Mathewson
dff1ef7d06
r17337@aud-055: nickm | 2008-07-24 10:17:43 +0200
...
Refactor the is_vote field of networkstatus_t to add a third possibility ("opinion") in addition to vote and opinion. First part of implementing proposal 147.
svn:r16166
2008-07-24 09:22:27 +00:00
Nick Mathewson
ea95ce25b6
r17323@aud-055: nickm | 2008-07-23 17:58:25 +0200
...
Implement most of proposal 110.
svn:r16156
2008-07-23 15:58:38 +00:00
Nick Mathewson
2748afe609
r17322@aud-055: nickm | 2008-07-23 16:50:50 +0200
...
Make circid_t and streamid_t get used instead of uint16_t; it is possible we will soon want to make circid_t change to uint32_t.
svn:r16155
2008-07-23 15:58:30 +00:00
Nick Mathewson
15b2b8bd69
r17309@aud-055: nickm | 2008-07-23 16:05:43 +0200
...
Patch from Christian Wilms: remove (HiddenService|Rend)(Exclude)?Nodes options. They never worked properly, and nobody seems to be using them. Resolves bug 754.
svn:r16144
2008-07-23 14:07:32 +00:00
Nick Mathewson
cc46b23248
r17308@aud-055: nickm | 2008-07-23 15:57:41 +0200
...
In connection_edge_destroy, send a stream status control event when we have an AP connection. Previously, we would send an event when the connection was AP and non-AP at the same time. This didn't work so well. Patch from Anonymous Remailer (Austria). Backport candidate.
svn:r16143
2008-07-23 14:07:26 +00:00
Nick Mathewson
087094961b
r17302@aud-055: nickm | 2008-07-23 14:55:28 +0200
...
Never allow a circuit to be created with the same circid as a circuit that has been marked for close. May be a fix for bug 779. Needs testing. Backport candidate.
svn:r16136
2008-07-23 12:55:55 +00:00
Nick Mathewson
26746d7578
r17220@tombo: nickm | 2008-07-18 15:11:27 -0400
...
Fix bug in last patch: ADDR_POLICY_REJECT is not the same as ADDR_POLICY_REJECTED.
svn:r16065
2008-07-18 19:11:30 +00:00
Nick Mathewson
c8160bce1f
r17188@tombo: nickm | 2008-07-18 14:35:18 -0400
...
Add new ExcludeExitNodes option. Also add a new routerset type to handle Exclude[Exit]Nodes. It is optimized for O(1) membership tests, so as to make choosing a random router run in O(N_routers) time instead of in O(N_routers*N_Excluded_Routers).
svn:r16061
2008-07-18 18:36:32 +00:00
Nick Mathewson
bdcbd23e23
Stop trying to detect versions of Tor on the server-side older than 0.1.1.15-rc; they simply do not work any more. Also add comment about how or_is_obsolete is a terrible field name.
...
svn:r15982
2008-07-16 13:15:11 +00:00
Roger Dingledine
267e61d0f3
When relays do their initial bandwidth measurement, don't limit
...
to just our our entry guards for the test circuits. Otherwise we
tend to have multiple test circuits going through a single entry
guard, which makes our bandwidth test less accurate. Fixes part
of bug 654; patch contributed by Josh Albrecht.
(Actually, modify Josh's patch to avoid doing that when you're
a bridge relay, since it would leak more than we want to leak.)
svn:r15850
2008-07-11 21:42:09 +00:00
Nick Mathewson
787c66b70f
r16917@tombo: nickm | 2008-07-11 12:55:26 -0400
...
Remove token enum constant in routerparse.c that we do not actually use.
svn:r15841
2008-07-11 17:08:05 +00:00
Karsten Loesing
9231858ff5
Fix bug 763. When a hidden service is giving up on an introduction point candidate that was not included in the last published rendezvous descriptor, don't reschedule publication of the next descriptor.
...
svn:r15825
2008-07-10 21:02:01 +00:00
Nick Mathewson
cb7cc9e12d
r16882@tombo: nickm | 2008-07-10 14:31:25 -0400
...
Fix for session-related bug found by Geoff Goodell. backport candidate, once tested.
svn:r15821
2008-07-10 18:31:33 +00:00
Nick Mathewson
c717e19a29
r16881@tombo: nickm | 2008-07-10 14:19:21 -0400
...
fix a rare segfault in bw-share-measuring code
svn:r15820
2008-07-10 18:31:28 +00:00
Nick Mathewson
135fa82a10
bump svn version to 0.2.1.2-alpha-dev
...
svn:r15806
2008-07-09 15:26:13 +00:00
Nick Mathewson
c5ec7a3677
Stop using __attribute__((nonnull)): It gets us occcasional warnings when we do something so foolish it can be detected without dataflow analysis, but it also eliminates some of our error checking code. Suggested by Peter Gutmann.
...
svn:r15803
2008-07-09 15:23:23 +00:00
Nick Mathewson
0f8761f9fa
fix typos in last patch spotted by sebastian and karsten
...
svn:r15700
2008-07-06 18:47:27 +00:00
Nick Mathewson
615c64efb8
Apply fix from chrisw: call connection_ap_attach_pending when we get a rendezvous2 or rendezvous_established call. This is a bit brute-foce, but it is better than we had before, and might not even show up on profiles. Backport candidate, once tested.
...
svn:r15699
2008-07-06 18:34:45 +00:00
Nick Mathewson
1a564901e4
Fix the rest of the GCC warnings on OpenBSD_malloc_linux.c
...
svn:r15698
2008-07-06 18:33:35 +00:00
Karsten Loesing
28296ad6e8
Correct punctuation.
...
svn:r15690
2008-07-06 13:59:36 +00:00
Nick Mathewson
8bc2ab03f8
Remove spurious "netintet" check from configure.in
...
svn:r15672
2008-07-05 21:17:04 +00:00
Nick Mathewson
9d7a2d4eae
r16689@tombo: nickm | 2008-07-03 11:03:14 -0400
...
Fix for bug 742: do not use O_CREAT on 2-option version of open(). Especially do not use it on /dev/null. Fix from Michael Scherer. Bugfix on 0.0.2pre19 (wow).
svn:r15626
2008-07-03 15:04:16 +00:00
Roger Dingledine
c411f83211
forward-port r15576
...
svn:r15577
2008-06-30 23:27:11 +00:00
Roger Dingledine
45742ce0b0
Make directory servers include the X-Your-Address-Is: http header in
...
their responses even for begin_dir conns. Now clients who only ever use
begin_dir connections still have a way to learn their IP address. Should
fix bug 737. Reported by goldy.
svn:r15571
2008-06-30 21:52:39 +00:00
Nick Mathewson
3ec25c2410
r16587@tombo: nickm | 2008-06-28 00:13:40 -0400
...
fix for bug 704; found by sjmurdoch. Windows and recent openssl both want to define OCSP_RESPONSE; do not let them.
svn:r15533
2008-06-28 04:16:17 +00:00
Roger Dingledine
aec928e0b6
Send a bootstrap problem "warn" event on the first problem if the
...
reason is NO_ROUTE (that is, our network is down).
svn:r15443
2008-06-24 08:00:30 +00:00
Roger Dingledine
b7d00bd52e
whoops, i shouldn't've left that in
...
svn:r15434
2008-06-23 18:51:12 +00:00
Karsten Loesing
33ced73597
Added prefixes to testing-network-only configuration options.
...
svn:r15375
2008-06-20 17:03:13 +00:00
Roger Dingledine
a2a3d1e329
prepare for the 0.2.1.2-alpha release. we will tag
...
sometime today. get your fixes in soon. :)
svn:r15371
2008-06-20 06:26:58 +00:00
Roger Dingledine
8fa912a8c5
If we close our OR connection because there's been a circuit
...
pending on it for too long, we were telling our bootstrap status
events "REASON=NONE". Now tell them "REASON=TIMEOUT".
svn:r15369
2008-06-20 04:42:17 +00:00
Roger Dingledine
94dabd2c23
If you're using bridges, generate "bootstrap problem" warnings
...
as soon as you run out of working bridges, rather than waiting
for ten failures -- which will never happen if you have less than
ten bridges.
svn:r15368
2008-06-20 04:34:39 +00:00
Roger Dingledine
dd50ffb1de
Big bridge bugfixes. Backport candidates.
...
If you have more than one bridge but don't know their keys,
you would only learn a request for the descriptor of the first one
on your list. (Tor considered launching requests for the others, but
found that it already had a connection on the way for $0000...0000
so it didn't open another.)
If you have more than one bridge but don't know their keys, and the
connection to one of the bridges failed, you would cancel all
pending bridge connections. (After all, they all have the same
digest.)
svn:r15366
2008-06-20 03:13:16 +00:00
Roger Dingledine
d76d0493d6
start sending "COUNT=%d RECOMMENDATION=%s" key/values on bootstrap
...
problem status events, so the controller can hear about problems even
before tor decides they're worth reporting for sure.
svn:r15357
2008-06-19 04:50:06 +00:00
Roger Dingledine
ad6b2e7523
check-spaces, fix a typo
...
svn:r15355
2008-06-18 20:14:25 +00:00
Roger Dingledine
c6a94718cd
Directory authorities shouldn't complain about bootstrapping
...
problems just because they do a lot of reachability testing and
some of the connection attempts fail.
svn:r15348
2008-06-18 07:34:04 +00:00
Roger Dingledine
50d3adb819
I was on the second paragraph of my or-dev mail explaining why I chose to
...
set starting=1 to avoid potential bugs with having it conflict with 0,
which I used to mean uninitialized, when I realized I would be writing
many more lame-sounding paragraphs in the future. Just start it at 0
and handle the bugs.
svn:r15346
2008-06-18 05:35:19 +00:00
Nick Mathewson
ed174245c6
implement more fine-tuning options for stats code
...
svn:r15345
2008-06-18 04:34:52 +00:00
Karsten Loesing
024de76e5d
I was told there is an extend_info_free(). I won't leak memory again. I won't leak memory again. I won't ...
...
svn:r15335
2008-06-17 19:13:05 +00:00
Karsten Loesing
693d7e3e35
When establishing a hidden service, introduction points that originate from cannibalized circuits are completely ignored and not included in rendezvous service descriptors. Bugfix on 0.2.0.14-alpha. Backport candidate.
...
svn:r15332
2008-06-17 17:10:03 +00:00
Roger Dingledine
1ad83d74b1
Send an initial "Starting" bootstrap status event, so we have a
...
state to start out in.
svn:r15326
2008-06-17 08:15:42 +00:00
Roger Dingledine
c19392469d
add a getinfo so vidalia can query our current bootstrap state, in case
...
it attaches partway through and wants to catch up.
matt, is this a good format for you, or is there an even better format?
svn:r15325
2008-06-17 08:01:43 +00:00
Peter Palfrader
efeea9f6de
Fix .z suffix for intrumented download stats once more
...
svn:r15316
2008-06-16 22:40:26 +00:00
Peter Palfrader
6880df52eb
Fix .z suffix for intrumented download stats
...
svn:r15315
2008-06-16 22:39:23 +00:00
Nick Mathewson
dd6324b0c6
More bug 707 fixes: no #if/#endif pairs inside macro arguments.
...
svn:r15307
2008-06-16 18:35:21 +00:00
Nick Mathewson
6299f4429a
Clean up a macro/cpp interaction related to bug 707. Also, add a new "filename" config value type which is currently just a synonym for string, but which might be subject to expansion later.
...
svn:r15305
2008-06-16 18:09:53 +00:00
Nick Mathewson
44452c2756
r16341@tombo: nickm | 2008-06-15 22:04:25 -0400
...
Allow spaces to be omitted in approved-router file fingerprints. Requested by arma.
svn:r15296
2008-06-16 02:08:30 +00:00
Nick Mathewson
96bf9cd4c5
Comments and doc tweaks on Karsten's testing-dir-networks patch
...
svn:r15254
2008-06-14 16:11:37 +00:00
Nick Mathewson
0831cc3dbc
Patch from Karsten to implement proposal 135 ("Testing Tor Networks").
...
svn:r15253
2008-06-14 16:01:29 +00:00
Nick Mathewson
97c06691b9
Malloc does not return size_t. (bug noticed by lodger.)
...
svn:r15252
2008-06-14 15:42:29 +00:00
Peter Palfrader
54b3b48802
Make unit tests pass again
...
svn:r15237
2008-06-13 23:24:11 +00:00
Roger Dingledine
6dee2bad83
note a bug that karsten found
...
svn:r15236
2008-06-13 23:05:48 +00:00
Roger Dingledine
5ded5b58a4
> why would it need an anonymized connection?
...
> ah.
> yes, i think you're right. i was thinking 3-hop, but i think it is 1-hop.
svn:r15235
2008-06-13 22:52:17 +00:00
Peter Palfrader
4ef606b8fc
implement proposal 138: removing down routers from consensus
...
svn:r15230
2008-06-13 21:22:49 +00:00
Nick Mathewson
4630f0453d
Explain how my emacs setup works in the HACKING file. Someone else may care too.
...
svn:r15228
2008-06-13 19:57:52 +00:00
Peter Palfrader
1f3dc9b22b
Asking for a conditional consensus at .../consensus/<fingerprints> would crash
...
a dirserver if it did not already have a consensus.
svn:r15227
2008-06-13 18:58:58 +00:00
Nick Mathewson
f9fd049f69
Bump version to 0.2.1.1-alpha-dev
...
svn:r15223
2008-06-13 16:35:27 +00:00
Nick Mathewson
d4ed91c672
Set dynamic-locking callbacks in openssl. These can be more efficient when openssl uses them.
...
svn:r15222
2008-06-13 16:35:12 +00:00