[or-cvs] r9530: Warn when we get a v0 control connection. (in tor/trunk: . doc src/or)

nickm at seul.org nickm at seul.org
Thu Feb 8 19:44:53 UTC 2007


Author: nickm
Date: 2007-02-08 14:44:48 -0500 (Thu, 08 Feb 2007)
New Revision: 9530

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/control.c
Log:
 r11716 at catbus:  nickm | 2007-02-08 14:19:24 -0500
 Warn when we get a v0 control connection.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11716] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-08 19:44:36 UTC (rev 9529)
+++ tor/trunk/ChangeLog	2007-02-08 19:44:48 UTC (rev 9530)
@@ -11,10 +11,16 @@
     - 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

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-02-08 19:44:36 UTC (rev 9529)
+++ tor/trunk/doc/TODO	2007-02-08 19:44:48 UTC (rev 9530)
@@ -66,13 +66,13 @@
         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
 

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-02-08 19:44:36 UTC (rev 9529)
+++ tor/trunk/src/or/control.c	2007-02-08 19:44:48 UTC (rev 9530)
@@ -2822,6 +2822,7 @@
   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 @@
       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 &&



More information about the tor-commits mailing list