aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-06-06 09:55:44 +1000
committerteor <teor@torproject.org>2019-06-06 09:55:44 +1000
commitc8c2e2b8fcc4d99adce600da8210a5e9ae653daf (patch)
tree6545bbb727d8aeb8cd394a623e6a2a5a387cdc4f /src/feature
parente5deb2bbc73d8830ae6c479a4532e72112f5484a (diff)
parentdc8e3cd5ce2affb849ed07db8b4a7788769c5935 (diff)
downloadtor-c8c2e2b8fcc4d99adce600da8210a5e9ae653daf.tar.gz
tor-c8c2e2b8fcc4d99adce600da8210a5e9ae653daf.zip
Merge branch 'bug30781_034' into bug30781_035
Moved fix from src/or/routerparse.c to src/feature/dirparse/routerparse.c.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/dirparse/routerparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/dirparse/routerparse.c b/src/feature/dirparse/routerparse.c
index a819302631..e44fbf77f9 100644
--- a/src/feature/dirparse/routerparse.c
+++ b/src/feature/dirparse/routerparse.c
@@ -556,6 +556,9 @@ router_parse_entry_from_string(const char *s, const char *end,
if ((tok = find_opt_by_keyword(tokens, A_PURPOSE))) {
tor_assert(tok->n_args);
router->purpose = router_purpose_from_string(tok->args[0]);
+ if (router->purpose == ROUTER_PURPOSE_UNKNOWN) {
+ goto err;
+ }
} else {
router->purpose = ROUTER_PURPOSE_GENERAL;
}