Nick Mathewson
8932753169
Merge remote branch 'rransom/bug2327-v2'
2011-01-03 13:07:43 -05:00
Nick Mathewson
8730884ebe
Merge remote branch 'origin/maint-0.2.2'
2011-01-03 11:53:28 -05:00
Nick Mathewson
f1de329e78
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
...
Conflicts:
src/common/test.h
src/or/test.c
2011-01-03 11:51:17 -05:00
Nick Mathewson
1a07348a50
Bump copyright statements to 2011
2011-01-03 11:50:39 -05:00
Robert Ransom
305ba230fe
Don't throw away incomplete SOCKS proxy responses.
...
Introduced in 9796b9bfa6
.
2010-12-29 05:55:45 -08:00
Robert Ransom
524fdeeb1e
Use evbuffer_pullup properly in fetch_from_evbuffer_socks_client.
...
evbuffer_pullup does nothing and returns NULL if the caller asks it to
linearize more data than the buffer contains.
Introduced in 9796b9bfa6
.
Reported by piebeer; fixed with help from doors.
2010-12-29 05:52:09 -08:00
Roger Dingledine
c79427a992
Merge branch 'maint-0.2.2'
2010-12-19 22:08:42 -05:00
Nick Mathewson
b5e293afe6
Merge remote branch fix_security_bug_021 into fix_security_bug_022
...
Conflicts:
src/common/memarea.c
src/or/or.h
src/or/rendclient.c
2010-12-15 22:48:23 -05:00
Nick Mathewson
b8a7bad799
Make payloads into uint8_t.
...
This will avoid some signed/unsigned assignment-related bugs.
2010-12-15 22:31:11 -05:00
Nick Mathewson
550be1df69
Merge remote branch 'origin/maint-0.2.2'
2010-11-15 15:41:37 -05:00
Nick Mathewson
cbad9f4520
Move controller event for socks warning into log_unsafe_socks_warning
2010-11-15 15:41:21 -05:00
Nick Mathewson
9399b885cd
Merge remote branch 'origin/maint-0.2.2'
...
Conflicts:
src/or/buffers.c
2010-11-15 15:37:23 -05:00
Sebastian Hahn
da3a6e724f
Rate-limit unsafe socks warning
...
Pick 5 seconds as the limit. 5 seconds is a compromise here between
making sure the user notices that the bad behaviour is (still) happening
and not spamming their log too much needlessly (the log message is
pretty long). We also keep warning every time if safesocks is
specified, because then the user presumably wants to hear about every
blocked instance.
(This is based on the original patch by Sebastian, then backported to
0.2.2 and with warnings split into their own function.)
2010-11-15 13:57:37 -05:00
Nick Mathewson
d61736aa6a
Merge remote branch 'origin/maint-0.2.2'
2010-11-12 13:06:54 -05:00
Nick Mathewson
dbba84c917
Avoid perma-blocking the controller on bug in shrink_freelist
...
In all likelihood, this bug would make Tor assert, but if it doesn't,
let's not have two bugs.
2010-11-12 13:05:58 -05:00
Robert Ransom
a421e284d0
Disable logging to control port connections in buf_shrink_freelists.
...
If buf_shrink_freelists calls log_warn for some reason, we don't want the log
call itself to throw buf_shrink_freelists further off the rails.
2010-11-12 03:07:09 -08:00
Robert Ransom
81affe1949
Move the original log_info call out of the core of buf_shrink_freelists.
...
Sending a log message to a control port can cause Tor to allocate a buffer,
thereby changing the length of the freelist behind buf_shrink_freelists's back,
thereby causing an assertion to fail.
Fixes bug #1125 .
2010-11-12 03:04:07 -08:00
Robert Ransom
6a0657d4bb
Disable logging to control port connections in buf_shrink_freelists.
...
If buf_shrink_freelists calls log_warn for some reason, we don't want the log
call itself to throw buf_shrink_freelists further off the rails.
2010-11-12 02:34:58 -08:00
Robert Ransom
6d2e02d79b
Move the original log_info call out of the core of buf_shrink_freelists.
...
Sending a log message to a control port can cause Tor to allocate a buffer,
thereby changing the length of the freelist behind buf_shrink_freelists's back,
thereby causing an assertion to fail.
Fixes bug #1125 .
2010-11-12 02:34:51 -08:00
Nick Mathewson
9516c1efdb
Remove XXXs about improving buf_t API: bufferevents are the future
2010-10-15 11:38:33 -04:00
Nick Mathewson
b49cf6a77a
Fix whitespace in bufferevents branch
2010-09-27 14:22:18 -04:00
Nick Mathewson
a16ed90ec8
Document and/or fix stuff found by Sebastian in code review
...
Thanks to Sebastian for his code-review of the bufferevents patch series.x
2010-09-27 14:22:18 -04:00
Sebastian Hahn
865bea3b89
Some bufferevents related fixes and pointers for nickm
2010-09-27 14:22:18 -04:00
Nick Mathewson
0c9b64d449
Get zlib compression working with bufferevents.
2010-09-27 14:22:11 -04:00
Nick Mathewson
9796b9bfa6
Implement SOCKS-client support for bufferevents
2010-09-27 12:31:14 -04:00
Nick Mathewson
bd3612cd2b
Get SSL connections and linked connections working with bufferevents.
...
Clients are now verified to work and build circuits correctly. There
are still a few warnings given here and there that I need to look into.
2010-09-27 12:31:14 -04:00
Nick Mathewson
44375d4eb8
Add a 0-pullup version of fetch_from_evbuffer_socks
2010-09-27 12:31:13 -04:00
Nick Mathewson
f6899f3a74
Documentation for inspect_evbuffer
2010-09-27 12:31:13 -04:00
Nick Mathewson
698085d56e
Add pullup-free version of fetch_from_evbuffer_http
2010-09-27 12:31:13 -04:00
Nick Mathewson
ddcb59bb70
Fix more remaining users of inbuf/outbuf to handle bufferevents instead.
2010-09-27 12:31:13 -04:00
Nick Mathewson
63079efb87
Add a fetch_from_evbuffer_http
2010-09-27 12:29:42 -04:00
Nick Mathewson
a0f4841e2b
Refactor SOCKS parsing code to handle evbuffers.
...
Now all of the logic is in a parse_socks() function that gets data
from a buf_t or evbuffer-specific wrapper.
2010-09-27 12:29:42 -04:00
Nick Mathewson
4836014168
Clone fetch_var_cell_from_buf() for evbuffers.
2010-09-27 12:28:43 -04:00
Nick Mathewson
0514917800
Add a new connection_fetch_from_buf_line() that can handle bufferevents
2010-09-27 12:28:43 -04:00
Nick Mathewson
57e7b54b7b
Teach read_event/write_event manipulators about bufferevents.
...
Add an --enable-bufferevents config switch.
2010-09-27 12:28:43 -04:00
Nick Mathewson
94aac84a71
Remove never-actually-finished code to use readv and writev for IO.
...
We'll get this feature for free with bufferevents, so there's no good reason
to clone it in Tor.
2010-09-27 12:28:43 -04:00
Roger Dingledine
47b23bd03e
A start at a patch for bug 1943 (alignment issues)
2010-09-20 18:40:32 -04:00
Nick Mathewson
8150e2ad24
Make buf_shrink_freelists warn, not crash, when n_to_skip is too high
...
This mitigates bug 1125, but doesn't fix its root cause (whatever
that is).
2010-08-10 15:58:41 -04:00
Sebastian Hahn
cc060ea220
Create reasons.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
0bfa34e1f6
Create control.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
0d33120c26
Create connection_or.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
78b6a4650b
Create connection_edge.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
c4f8f1316e
Create config.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
34dfce0d82
Create buffers.h
2010-07-27 07:56:26 +02:00
Nick Mathewson
14bc4dcc22
Rename log.h to torlog.h
...
This should make us conflict less with system files named "log.h".
Yes, we shouldn't have been conflicting with those anyway, but some
people's compilers act very oddly.
The actual change was done with one "git mv", by editing
Makefile.am, and running
find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
2010-07-09 22:05:38 -04:00
Sebastian Hahn
10fdb9ee0a
Add option to not warn when getting an IP instead of hostname
2010-06-07 12:44:25 +02:00
Nick Mathewson
b006e3279f
Merge remote branch 'origin/maint-0.2.1'
...
Conflicts:
src/common/test.h
src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2
Update Tor Project copyright years
2010-02-27 17:14:21 -05:00
Nick Mathewson
350181529e
Merge branch 'safelogging2'
...
Conflicts:
ChangeLog
2009-12-15 17:26:09 -05:00
Nick Mathewson
fcbd65b45c
Refactor the safe_str_*() API to make more sense.
...
The new rule is: safe_str_X() means "this string is a piece of X
information; make it safe to log." safe_str() on its own means
"this string is a piece of who-knows-what; make it safe to log".
2009-12-15 17:25:34 -05:00