|
@@ -76,6 +76,14 @@ static const node_t *choose_random_entry_impl(cpath_build_state_t *state,
|
|
|
int *n_options_out);
|
|
|
static int num_bridges_usable(void);
|
|
|
|
|
|
+
|
|
|
+ * consensus parameter is not set */
|
|
|
+#define DEFAULT_N_GUARDS 1
|
|
|
+
|
|
|
+ * consensus parameter is set). */
|
|
|
+#define MIN_N_GUARDS 1
|
|
|
+#define MAX_N_GUARDS 10
|
|
|
+
|
|
|
|
|
|
const smartlist_t *
|
|
|
get_entry_guards(void)
|
|
@@ -488,7 +496,8 @@ decide_num_guards(const or_options_t *options, int for_directory)
|
|
|
return options->NumEntryGuards;
|
|
|
|
|
|
|
|
|
- return networkstatus_get_param(NULL, "NumEntryGuards", 3, 1, 10);
|
|
|
+ return networkstatus_get_param(NULL, "NumEntryGuards", DEFAULT_N_GUARDS,
|
|
|
+ MIN_N_GUARDS, MAX_N_GUARDS);
|
|
|
}
|
|
|
|
|
|
|