Commit 5c03f82a authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

r18345@catbus: nickm | 2008-02-21 13:45:04 -0500

 Do the last part of arma's fix for bug 437: Track the origin of every addrmap, and use this info so we can remove all the trackhostexits-originated mappings for a given exit.


svn:r13660
parent 6b50f5ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@ Changes in version 0.2.0.20-?? - 2008-02-??
    - Start choosing which bridge to use proportional to its advertised
      bandwidth, rather than uniformly at random. This should speed up Tor
      for bridge users. Also do this for people who set StrictEntryNodes.
    - When a TrackHostExits-chosen exit fails too many times in a row,
      stop using it.  Bugfix on 0.1.2.x.  Fixes bug 437.

  o Major bugfixes:
    - Resolved problems with (re-)fetching hidden service descriptors.
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ R . FAQ entry which is wrong
      non-encrypted request
  o write a tor-gencert man page

  . geoip caching and publishing for bridges
N . geoip caching and publishing for bridges
    d Track consecutive time up, not time since last-forgotten IP.
    - Mention in dir-spec.txt
    - Mention in control-spec.txt
+7 −0
Original line number Diff line number Diff line
@@ -286,6 +286,13 @@ DECLARE_MAP_FNS(digestmap_t, const char *, digestmap_);
/** Used to end a DIGESTMAP_FOREACH() block. */
#define DIGESTMAP_FOREACH_END MAP_FOREACH_END

#define STRMAP_FOREACH(map, keyvar, valtype, valvar)                 \
  MAP_FOREACH(strmap_, map, const char *, keyvar, valtype, valvar)
#define STRMAP_FOREACH_MODIFY(map, keyvar, valtype, valvar)          \
  MAP_FOREACH_MODIFY(strmap_, map, const char *, keyvar, valtype, valvar)
#define STRMAP_FOREACH_END MAP_FOREACH_END


void* strmap_set_lc(strmap_t *map, const char *key, void *val);
void* strmap_get_lc(const strmap_t *map, const char *key);
void* strmap_remove_lc(strmap_t *map, const char *key);
+10 −0
Original line number Diff line number Diff line
@@ -267,6 +267,16 @@ typedef uint32_t uintptr_t;
#endif
#endif

#ifndef SHORT_MAX
#if (SIZEOF_SHORT == 2)
#define SHORT_MAX 0x7fff
#elif (SIZEOF_SHORT == 4)
#define SHORT_MAX 0x7fffffff
#else
#error "Can't define SHORT_MAX"
#endif
#endif

#ifndef TIME_MAX

#ifdef TIME_T_IS_SIGNED
+2 −1
Original line number Diff line number Diff line
@@ -1212,7 +1212,8 @@ consider_recording_trackhost(edge_connection_t *conn, origin_circuit_t *circ)
               conn->socks_request->address, fp);

  addressmap_register(conn->socks_request->address, new_address,
                      time(NULL) + options->TrackHostExitsExpire);
                      time(NULL) + options->TrackHostExitsExpire,
                      ADDRMAPSRC_TRACKEXIT);
}

/** Attempt to attach the connection <b>conn</b> to <b>circ</b>, and send a
Loading