1. 03 Jan, 2011 3 commits
  2. 21 Dec, 2010 4 commits
  3. 17 Dec, 2010 2 commits
  4. 16 Dec, 2010 8 commits
  5. 14 Dec, 2010 1 commit
  6. 13 Dec, 2010 2 commits
  7. 11 Dec, 2010 2 commits
  8. 08 Dec, 2010 1 commit
  9. 07 Dec, 2010 3 commits
  10. 06 Dec, 2010 2 commits
    • Nick Mathewson's avatar
      Fix a bug in calculating wakeup time on 64-bit machines. · dc2f10bd
      Nick Mathewson authored
      If you had TIME_MAX > INT_MAX, and your "time_to_exhaust_bw =
      accountingmax/expected_bandwidth_usage * 60" calculation managed to
      overflow INT_MAX, then your time_to_consider value could underflow and
      wind up being rediculously low or high.  "Low" was no problem;
      negative values got caught by the (time_to_consider <= 0) check.
      "High", however, would get you a wakeup time somewhere in the distant
      future.
      
      The fix is to check for time_to_exhaust_bw overflowing INT_MAX, not
      TIME_MAX: We don't allow any accounting interval longer than a month,
      so if time_to_exhaust_bw is significantly larger than 31*24*60*60, we
      can just clip it.
      
      This is a bugfix on 0.0.9pre6, when accounting was first introduced.
      It fixes bug 2146, unless there are other causes there too.  The fix
      is from boboper.  (I tweaked it slightly by removing an assignment
      that boboper marked as dead, and lowering a variable that no longer
      needed to be function-scoped.)
      dc2f10bd
    • Nick Mathewson's avatar
      Add a missing ! to directory_fetches_from_authorities · feffbce8
      Nick Mathewson authored
      The old logic would have us fetch from authorities if we were refusing
      unknown exits and our exit policy was reject*.  Instead, we want to
      fetch from authorities if we're refusing unknown exits and our exit
      policy is _NOT_ reject*.
      
      Fixed by boboper.  Fixes more of 2097.  Bugfix on 0.2.2.16-alpha.
      feffbce8
  11. 03 Dec, 2010 1 commit
    • Nick Mathewson's avatar
      Don't crash when accountingmax is set in non-server Tors · c0f1517d
      Nick Mathewson authored
      We use a hash of the identity key to seed a prng to tell when an
      accounting period should end.  But thanks to the bug998 changes,
      clients no longer have server-identity keys to use as a long-term seed
      in accounting calculations.  In any case, their identity keys (as used
      in TLS) were never never fixed.  So we can just set the wakeup time
      from a random seed instead there.  Still open is whether everybody
      should be random.
      
      This patch fixes bug 2235, which was introduced in 0.2.2.18-alpha.
      
      Diagnosed with help from boboper on irc.
      c0f1517d
  12. 02 Dec, 2010 1 commit
  13. 01 Dec, 2010 8 commits
  14. 29 Nov, 2010 2 commits