|
@@ -52,23 +52,24 @@ static void clear_cached_dir(cached_dir_t *d);
|
|
|
#define FP_REJECT 4
|
|
|
#define FP_BADEXIT 8
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ * map. */
|
|
|
typedef struct router_status_t {
|
|
|
char nickname[MAX_NICKNAME_LEN+1];
|
|
|
uint32_t status;
|
|
|
} router_status_t;
|
|
|
|
|
|
|
|
|
- * that we name. Used to prevent router impersonation. DODDOC */
|
|
|
+ * that we name. Used to prevent router impersonation. */
|
|
|
typedef struct authdir_config_t {
|
|
|
strmap_t *fp_by_name;
|
|
|
- digestmap_t *status_by_digest;
|
|
|
+ digestmap_t *status_by_digest;
|
|
|
} authdir_config_t;
|
|
|
|
|
|
|
|
|
authdir_config_t *fingerprint_list = NULL;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
static authdir_config_t *
|
|
|
authdir_config_new(void)
|
|
|
{
|
|
@@ -576,11 +577,12 @@ dirserv_add_descriptor(const char *desc, const char **msg)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ * different. */
|
|
|
static INLINE int
|
|
|
bool_neq(int a, int b)
|
|
|
{
|
|
|
- return (a && !b) || (!a && b);
|
|
|
+ return (a) ? !b : b;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1338,7 +1340,8 @@ dirserv_get_runningrouters(const char **rr, int compress)
|
|
|
|
|
|
static cached_dir_t *the_v2_networkstatus = NULL;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ * enough that we should generate a new network status doc. */
|
|
|
static int
|
|
|
should_generate_v2_networkstatus(void)
|
|
|
{
|
|
@@ -1488,11 +1491,11 @@ dirserv_compute_performance_thresholds(routerlist_t *rl)
|
|
|
static cached_dir_t *
|
|
|
generate_v2_networkstatus(void)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
#define LONGEST_STATUS_FLAG_NAME_LEN 9
|
|
|
-
|
|
|
-#define N_STATUS_FLAGS 9
|
|
|
-
|
|
|
+
|
|
|
+#define N_STATUS_FLAGS 10
|
|
|
+
|
|
|
#define RS_ENTRY_LEN \
|
|
|
( \
|
|
|
MAX_NICKNAME_LEN+BASE64_DIGEST_LEN*2+ISO_TIME_LEN+INET_NTOA_BUF_LEN+ \
|