aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-01-03 19:58:00 +0000
committerNick Mathewson <nickm@torproject.org>2007-01-03 19:58:00 +0000
commit2963d4acc267102e1b2927ed6bbcd0717fbae67e (patch)
tree25a7b9091ce8e207624c040a507ffbf835b0f97a /src/or/routerparse.c
parent931e555ef9c3d1ec88d1f051cb01c4d09e608876 (diff)
downloadtor-2963d4acc267102e1b2927ed6bbcd0717fbae67e.tar
tor-2963d4acc267102e1b2927ed6bbcd0717fbae67e.tar.gz
r11820@Kushana: nickm | 2007-01-03 14:54:05 -0500
Add (and specify) a BadDirectory flag to networkstatuses, so authorities can tell clients that some caches are broken. Also, implement an as-yet-unused function to estimate how many bytes will be sent on a directory connection. svn:r9255
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 611eab08c..8cd08d6b1 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1077,6 +1077,8 @@ routerstatus_parse_entry_from_string(const char **s, smartlist_t *tokens)
rs->is_possible_guard = 1;
else if (!strcmp(tok->args[i], "BadExit"))
rs->is_bad_exit = 1;
+ else if (!strcmp(tok->args[i], "BadDirectory"))
+ rs->is_bad_directory = 1;
}
}
if ((tok = find_first_by_keyword(tokens, K_V))) {
@@ -1224,6 +1226,8 @@ networkstatus_parse_from_string(const char *s)
ns->recommends_versions = 1;
if (!strcmp(tok->args[i], "BadExits"))
ns->lists_bad_exits = 1;
+ if (!strcmp(tok->args[i], "BadDirectories"))
+ ns->lists_bad_directories = 1;
}
}