summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-08 19:44:48 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-08 19:44:48 +0000
commit69def349e095a2465d8c118111afcf5cd6b0da3b (patch)
treeac3d0331d659b814903671367c1f45833f95cd34
parent9c081ab97645d2ea1493f474ecdf8d57895bde7f (diff)
downloadtor-69def349e095a2465d8c118111afcf5cd6b0da3b.tar.gz
tor-69def349e095a2465d8c118111afcf5cd6b0da3b.zip
r11716@catbus: nickm | 2007-02-08 14:19:24 -0500
Warn when we get a v0 control connection. svn:r9530
-rw-r--r--ChangeLog8
-rw-r--r--doc/TODO4
-rw-r--r--src/or/control.c10
3 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 35bd42ccd6..e46050a6bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,10 +11,16 @@ Changes in version 0.1.2.8-alpha - 2007-??-??
- Report events where a resolve succeeded or where we got a socks
protocol error correctly, rather than calling both of them "INTERNAL".
- o Minor bugfixes (other)
+ o Minor bugfixes (other):
- Display correct results when reporting which versions are recommended,
and how recommended they are. (Resolves bug 383.)
+ o Minor features:
+ - Warn the user when an application uses the obsolete binary v0 control
+ protocol. We're planning to remove support for it during the next
+ development series, so it's good to give people some advance warning.
+
+
Changes in version 0.1.2.7-alpha - 2007-02-06
o Major bugfixes (rate limiting):
- Servers decline directory requests much more aggressively when
diff --git a/doc/TODO b/doc/TODO
index 59c25dd638..93daec5419 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -66,13 +66,13 @@ R - actually cause the directory.c functions to know about or_port
or_conn is full, and accept the sometimes directory data will just
never get written.
-N - When we get a connection using the v0 controller protocol, warn that the
+ o When we get a connection using the v0 controller protocol, warn that the
next revision of Tor won't support it.
N - DNS improvements
. Asynchronous DNS
- Make evdns use windows strerror equivalents.
- . Make sure patches get into libevent.
+ o Make sure patches get into libevent.
- Verify that it works well on windows
o Debug and re-enable server-side reverse DNS caching
diff --git a/src/or/control.c b/src/or/control.c
index 2aef65f1f5..46d873b961 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2822,6 +2822,7 @@ connection_control_process_inbuf_v0(control_connection_t *conn)
uint32_t body_len;
uint16_t command_type;
char *body=NULL;
+ static int have_warned_about_v0_protocol = 0;
again:
/* Try to suck a control message from the buffer. */
@@ -2850,6 +2851,15 @@ connection_control_process_inbuf_v0(control_connection_t *conn)
tor_assert(0);
}
+ if (!have_warned_about_v0_protocol) {
+ log_warn(LD_CONTROL, "An application has connected to us using the "
+ "version 0 control prototol, which has been deprecated since "
+ "Tor 0.1.1.1-alpha. This protocol will not be supported by "
+ "future versions of Tor; please use the v1 control protocol "
+ "instead.");
+ have_warned_about_v0_protocol = 1;
+ }
+
/* We got a command. If we need authentication, only authentication
* commands will be considered. */
if (conn->_base.state == CONTROL_CONN_STATE_NEEDAUTH_V0 &&