[or-cvs] r9495: more changes. i'm all caught up now. (in tor/trunk: . src/common src/or)

arma at seul.org arma at seul.org
Tue Feb 6 02:49:13 UTC 2007


Author: arma
Date: 2007-02-05 21:49:07 -0500 (Mon, 05 Feb 2007)
New Revision: 9495

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/common/crypto.c
   tor/trunk/src/or/circuitlist.c
   tor/trunk/src/or/connection_edge.c
   tor/trunk/src/or/control.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/routerlist.c
Log:
more changes. i'm all caught up now.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/ChangeLog	2007-02-06 02:49:07 UTC (rev 9495)
@@ -1,8 +1,10 @@
-Changes in version 0.1.2.7-alpha - 2007-??-??
+Changes in version 0.1.2.7-alpha - 2007-02-06
   o Major bugfixes (rate limiting):
     - Servers decline directory requests much more aggressively when
       they're low on bandwidth. Otherwise they end up queueing more and
       more directory responses, which can't be good for latency.
+    - Fix a memory leak when sending a 503 response for a networkstatus
+      request.
     - But never refuse directory requests from local addresses.
     - Be willing to read or write on local connections (e.g. controller
       connections) even when the global rate limiting buckets are empty.
@@ -20,15 +22,13 @@
       existing installed services.
 
   o Major bugfixes (other):
-    - Fix a crash bug in the presence of DNS hijacking (reported by Andrew
-      Del Vecchio).
     - Previously, we would cache up to 16 old networkstatus documents
       indefinitely, if they came from nontrusted authorities. Now we
       discard them if they are more than 10 days old.
+    - Fix a crash bug in the presence of DNS hijacking (reported by Andrew
+      Del Vecchio).
     - Detect and reject malformed DNS responses containing circular
       pointer loops.
-    - Fix a memory leak when sending a 503 response for a networkstatus
-      request.
     - If exits are rare enough that we're not marking exits as guards,
       ignore exit bandwidth when we're deciding the required bandwidth
       to become a guard.
@@ -39,38 +39,40 @@
       slowdowns in tunneled dir connections; a better solution will have
       to wait for 0.2.0.)
 
-  o Minor bugfixes:
+  o Minor bugfixes (dns):
+    - Add some defensive programming to eventdns.c in an attempt to catch
+      possible memory-stomping bugs.
+    - Detect and reject DNS replies containing IPv4 or IPv6 records with
+      an incorrect number of bytes. (Previously, we would ignore the
+      extra bytes.)
+    - Fix as-yet-unused reverse IPv6 lookup code so it sends nybbles
+      in the correct order, and doesn't crash.
+    - Free memory held in recently-completed DNS lookup attempts on exit.
+      This was not a memory leak, but may have been hiding memory leaks.
+    - Handle TTL values correctly on reverse DNS lookups.
+    - Treat failure to parse resolv.conf as an error.
+
+  o Minor bugfixes (other):
+    - Fix crash with "tor --list-fingerprint" (reported by seeess).
     - When computing clock skew from directory HTTP headers, consider what
       time it was when we finished asking for the directory, not what
       time it is now.
-    - Add some defensive programming to eventdns.c in an attempt to catch
-      possible memory-stomping bugs.
-    - Fix crash with "tor --list-fingerprint" (reported by seeess).
     - Expire socks connections if they spend too long waiting for the
       handshake to finish. Previously we would let them sit around for
       days, if the connecting application didn't close them either.
     - And if the socks handshake hasn't started, don't send a
       "DNS resolve socks failed" handshake reply; just close it.
     - Stop using C functions that OpenBSD's linker doesn't like.
-    - Detect and reject DNS replies containing IPv4 or IPv6 records with
-      an incorrect number of bytes. (Previously, we would ignore the
-      extra bytes.)
-    - Fix as-yet-unused reverse IPv6 lookup code so it sends nybbles
-      in the correct order, and doesn't crash.
-    - Free memory held in recently-completed DNS lookup attempts on exit.
-      This was not a memory leak, but may have been hiding memory leaks.
     - Don't launch requests for descriptors unless we have networkstatuses
       from at least half of the authorities.  This delays the first
       download slightly under pathological circumstances, but can prevent
       us from downloading a bunch of descriptors we don't need.
     - Do not log IPs with TLS failures for incoming TLS
       connections. (Fixes bug 382.)
-    - If the user asks to use invalid exit nodes, be willing to use the
+    - If the user asks to use invalid exit nodes, be willing to use
       unstable ones.
-    - Handle TTL values correctly on reverse DNS lookups.
     - Stop using the reserved ac_cv namespace in our configure script.
     - Call stat() slightly less often; use fstat() when possible.
-    - Treat failure to parse resolv.conf as an error.
     - Refactor the way we handle pending circuits when an OR connection
       completes or fails, in an attempt to fix a rare crash bug.
 
@@ -105,9 +107,11 @@
     - Add a SOCKS_BAD_HOSTNAME client status event so controllers
       can learn when clients are sending malformed hostnames to Tor.
     - Clean up documentation for controller status events.
-    - Add a REMAP status to stream events to note that a stream's address has
-      changed because of a cached address or a MapAddress directive.
+    - Add a REMAP status to stream events to note that a stream's
+      address has changed because of a cached address or a MapAddress
+      directive.
 
+
 Changes in version 0.1.2.6-alpha - 2007-01-09
   o Major bugfixes:
     - Fix an assert error introduced in 0.1.2.5-alpha: if a single TLS

Modified: tor/trunk/src/common/crypto.c
===================================================================
--- tor/trunk/src/common/crypto.c	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/common/crypto.c	2007-02-06 02:49:07 UTC (rev 9495)
@@ -550,7 +550,7 @@
   return 0;
 }
 
-/** Write the private key from 'env' into the file named by 'fname',
+/** Write the private key from <b>env</b> into the file named by <b>fname</b>,
  * PEM-encoded.  Return 0 on success, -1 on failure.
  */
 int

Modified: tor/trunk/src/or/circuitlist.c
===================================================================
--- tor/trunk/src/or/circuitlist.c	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/or/circuitlist.c	2007-02-06 02:49:07 UTC (rev 9495)
@@ -218,7 +218,7 @@
 }
 
 /** Return the number of circuits in state OR_WAIT, waiting for the given
- * connection.  */
+ * connection. */
 int
 circuit_count_pending_on_or_conn(or_connection_t *or_conn)
 {
@@ -676,7 +676,7 @@
 }
 
 /** Return the first circuit originating here in global_circuitlist after
- * <b>start</b> whose purpose is <b>purpose</b> is purpose, and where
+ * <b>start</b> whose purpose is <b>purpose</b>, and where
  * <b>digest</b> (if set) matches the rend_pk_digest field. Return NULL if no
  * circuit is found.  If <b>start</b> is NULL, begin at the start of the list.
  */
@@ -707,7 +707,7 @@
 
 /** Return the first OR circuit in the global list whose purpose is
  * <b>purpose</b>, and whose rend_token is the <b>len</b>-byte
- * <b>token</b>.  */
+ * <b>token</b>. */
 static or_circuit_t *
 circuit_get_by_rend_token_and_purpose(uint8_t purpose, const char *token,
                                       size_t len)

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/or/connection_edge.c	2007-02-06 02:49:07 UTC (rev 9495)
@@ -712,8 +712,8 @@
 }
 
 /** If we have a cached reverse DNS entry for the address stored in the
- * <b>maxlen</b>-byte buffer <b>address</b> (typically, a dotted quad) with
- * the cached value and return 1.  Otherwise return  0. */
+ * <b>maxlen</b>-byte buffer <b>address</b> (typically, a dotted quad) then
+ * rewrite to the cached value and return 1.  Otherwise return 0. */
 static int
 addressmap_rewrite_reverse(char *address, size_t maxlen)
 {
@@ -2021,8 +2021,8 @@
  *
  * If <b>reply</b> is defined, then write <b>replylen</b> bytes of it to conn
  * and return, else reply based on <b>endreason</b> (one of
- * END_STREAM_REASON_*). If <b>reply</b> is undefined, <b>endreason</b> can't 0
- * or REASON_DONE.  Send endreason to the controller, if appropriate.
+ * END_STREAM_REASON_*). If <b>reply</b> is undefined, <b>endreason</b> can't
+ * be 0 or REASON_DONE.  Send endreason to the controller, if appropriate.
  */
 void
 connection_ap_handshake_socks_reply(edge_connection_t *conn, char *reply,

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/or/control.c	2007-02-06 02:49:07 UTC (rev 9495)
@@ -635,10 +635,10 @@
  *
  * If <b>which</b> & SHORT_NAMES, the event contains short-format names: send
  * it to controllers that haven't enabled the VERBOSE_NAMES feature.  If
- * <b>which</b> & LONG_NAMES, the event contains long-format names: sent it
+ * <b>which</b> & LONG_NAMES, the event contains long-format names: send it
  * to contollers that <em>have</em> enabled VERBOSE_NAMES.
  *
- * The EXTENDED_FORMAT and NONEXTENDED_FORMAT flags behaves similarly with
+ * The EXTENDED_FORMAT and NONEXTENDED_FORMAT flags behave similarly with
  * respect to the EXTENDED_EVENTS feature. */
 static void
 send_control1_event_string(uint16_t event, event_format_t which,
@@ -3136,7 +3136,7 @@
 }
 
 /** Convert the reason for ending a stream <b>reason</b> into the format used
- * in STREAM events. Return NULL if the reason is unrecognized.*/
+ * in STREAM events. Return NULL if the reason is unrecognized. */
 static const char *
 stream_end_reason_to_string(int reason)
 {
@@ -3663,9 +3663,9 @@
   return 0;
 }
 
-/** Helper: sents a status event where <b>type</b> is one of
+/** Helper: sends a status event where <b>type</b> is one of
  * EVENT_STATUS_{GENERAL,CLIENT,SERVER}, where <b>severity</b> is one of
- * LOG_{NOTICE,WARN,ERR}, and where <b>format</b> is a print-style format
+ * LOG_{NOTICE,WARN,ERR}, and where <b>format</b> is a printf-style format
  * string corresponding to <b>args</b>. */
 static int
 control_event_status(int type, int severity, const char *format, va_list args)
@@ -3712,7 +3712,7 @@
 }
 
 /** Format and send an EVENT_STATUS_GENERAL event whose main text is obtained
- * by formatting the arguments using the printf-style <b>format</b> */
+ * by formatting the arguments using the printf-style <b>format</b>. */
 int
 control_event_general_status(int severity, const char *format, ...)
 {
@@ -3728,7 +3728,7 @@
 }
 
 /** Format and send an EVENT_STATUS_CLIENT event whose main text is obtained
- * by formatting the arguments using the printf-style <b>format</b> */
+ * by formatting the arguments using the printf-style <b>format</b>. */
 int
 control_event_client_status(int severity, const char *format, ...)
 {
@@ -3744,7 +3744,7 @@
 }
 
 /** Format and send an EVENT_STATUS_SERVER event whose main text is obtained
- * by formatting the arguments using the printf-style <b>format</b> */
+ * by formatting the arguments using the printf-style <b>format</b>. */
 int
 control_event_server_status(int severity, const char *format, ...)
 {
@@ -3761,7 +3761,7 @@
 
 /** Called when the status of an entry guard with the given <b>nickname</b>
  * and identity <b>digest</b> has changed to <b>status</b>: tells any
- * controllers that care.  */
+ * controllers that care. */
 int
 control_event_guard(const char *nickname, const char *digest,
                     const char *status)

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/or/or.h	2007-02-06 02:49:07 UTC (rev 9495)
@@ -606,11 +606,11 @@
 /** How long to test reachability before complaining to the user. */
 #define TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT (20*60)
 
-/** legal characters in a nickname */
+/** Legal characters in a nickname. */
 #define LEGAL_NICKNAME_CHARACTERS \
   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
 
-/** Name to use in client TLS certificates if no nickname is given.*/
+/** Name to use in client TLS certificates if no nickname is given. */
 #define DEFAULT_CLIENT_NICKNAME "client"
 
 /** DOCDOC */

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-02-06 02:01:21 UTC (rev 9494)
+++ tor/trunk/src/or/routerlist.c	2007-02-06 02:49:07 UTC (rev 9495)
@@ -981,7 +981,10 @@
           this_bw = (uint32_t)(partial/i);
         /*XXXX012 The above calculation is an awful hack, and makes our
          * algorithm hard to describe sanely. Could we do better with a second
-         * pass through the list? -NM */
+         * pass through the list? -NM
+         * Sure, fine by me. I fear this thing becoming too intensive,
+         * but nobody has mentioned it in profiling yet. -RD
+         */
       }
     } else {
       router = smartlist_get(sl, i);



More information about the tor-commits mailing list