summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 00365cf4f7..5a8a17796a 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1184,6 +1184,7 @@ router_parse_entry_from_string(const char *s, const char *end,
tor_assert(tok->n_args >= 5);
router = tor_malloc_zero(sizeof(routerinfo_t));
+ router->country = -1;
router->cache_info.routerlist_index = -1;
router->cache_info.annotations_len = s-start_of_annotations + prepend_len;
router->cache_info.signed_descriptor_len = end-s;
@@ -1388,6 +1389,8 @@ router_parse_entry_from_string(const char *s, const char *end,
"router descriptor") < 0)
goto err;
+ routerinfo_set_country(router);
+
if (!router->or_port) {
log_warn(LD_DIR,"or_port unreadable or 0. Failing.");
goto err;