소스 검색

Ignore CircuitPriorityHalflife values under -EPSILON.

Previously, we were ignoring values _over_ EPSILON.  This bug was
also causing a warning at startup because the default value is set
to -1.0.

Fixes bug 25577; bugfix on 6b1dba214db.  Bug not in any released tor.
Nick Mathewson 6 년 전
부모
커밋
2748dd0f1c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/or/circuitmux_ewma.c

+ 1 - 1
src/or/circuitmux_ewma.c

@@ -643,7 +643,7 @@ get_circuit_priority_halflife(const or_options_t *options,
     ((double) CMUX_PRIORITY_HALFLIFE_MSEC_DEFAULT) / 1000.0;
 
   /* Try to get it from configuration file first. */
-  if (options && options->CircuitPriorityHalflife < EPSILON) {
+  if (options && options->CircuitPriorityHalflife >= -EPSILON) {
     halflife = options->CircuitPriorityHalflife;
     *source_msg = "CircuitPriorityHalflife in configuration";
     goto end;