Loading changes/ticket12688 +3 −2 Changes for changes/ticket12688: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Major features: - Make the number of entry guards (and thus, by default, directory guards too) configurable via a new NumEntryGuards consensus - Make the number of entry guards configurable via a new NumEntryGuards consensus parameter, and the number of directory guards configurable via a new NumDirectoryGuards consensus parameter. Implements ticket 12688. src/or/entrynodes.c +9 −1 Changes for src/or/entrynodes.c: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -433,10 +433,18 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend, static int decide_num_guards(const or_options_t *options, int for_directory) { if (for_directory && options->NumDirectoryGuards != 0) if (for_directory) { int answer; if (options->NumDirectoryGuards != 0) return options->NumDirectoryGuards; answer = networkstatus_get_param(NULL, "NumDirectoryGuards", 0, 0, 10); if (answer) /* non-zero means use the consensus value */ return answer; } if (options->NumEntryGuards) return options->NumEntryGuards; /* Use the value from the consensus, or 3 if no guidance. */ return networkstatus_get_param(NULL, "NumEntryGuards", 3, 1, 10); } Loading Loading
changes/ticket12688 +3 −2 Changes for changes/ticket12688: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Major features: - Make the number of entry guards (and thus, by default, directory guards too) configurable via a new NumEntryGuards consensus - Make the number of entry guards configurable via a new NumEntryGuards consensus parameter, and the number of directory guards configurable via a new NumDirectoryGuards consensus parameter. Implements ticket 12688.
src/or/entrynodes.c +9 −1 Changes for src/or/entrynodes.c: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -433,10 +433,18 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend, static int decide_num_guards(const or_options_t *options, int for_directory) { if (for_directory && options->NumDirectoryGuards != 0) if (for_directory) { int answer; if (options->NumDirectoryGuards != 0) return options->NumDirectoryGuards; answer = networkstatus_get_param(NULL, "NumDirectoryGuards", 0, 0, 10); if (answer) /* non-zero means use the consensus value */ return answer; } if (options->NumEntryGuards) return options->NumEntryGuards; /* Use the value from the consensus, or 3 if no guidance. */ return networkstatus_get_param(NULL, "NumEntryGuards", 3, 1, 10); } Loading