瀏覽代碼

bugfix: only try to use the EntryNodes config option if it is set.

svn:r5701
Roger Dingledine 19 年之前
父節點
當前提交
358052416d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/or/config.c

+ 3 - 2
src/or/config.c

@@ -704,8 +704,9 @@ options_act(or_options_t *old_options)
   }
   }
 
 
   /* Check if we need to parse and add the EntryNodes config option. */
   /* Check if we need to parse and add the EntryNodes config option. */
-  if (!old_options ||
+  if (options->EntryNodes &&
-      !opt_streq(old_options->EntryNodes, options->EntryNodes))
+      (!old_options ||
+       !opt_streq(old_options->EntryNodes, options->EntryNodes)))
     entry_nodes_should_be_added();
     entry_nodes_should_be_added();
 
 
   /* Since our options changed, we might need to regenerate and upload our
   /* Since our options changed, we might need to regenerate and upload our