Skip to content
Snippets Groups Projects
  1. Dec 17, 2010
  2. Dec 16, 2010
  3. Dec 14, 2010
  4. Dec 13, 2010
  5. Dec 08, 2010
  6. Dec 07, 2010
  7. Dec 06, 2010
    • 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
  8. Dec 03, 2010
    • 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
  9. Dec 02, 2010
  10. Dec 01, 2010
  11. Nov 29, 2010
  12. Nov 24, 2010
Loading