diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-17 19:47:22 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-17 19:47:22 -0400 |
commit | 3f49474349538be499ab485c697c147c8829fa0d (patch) | |
tree | 060784f765cd523151958a0c0ef34064f17ee407 /src/or/dirserv.c | |
parent | d6a2fec05ebcc39773a2f6666e1378410c64f047 (diff) | |
parent | 00f74e0372a956f9db590e1cb2ddcfb265125023 (diff) | |
download | tor-3f49474349538be499ab485c697c147c8829fa0d.tar.gz tor-3f49474349538be499ab485c697c147c8829fa0d.zip |
Merge branch 'bug17150_027_extra' into maint-0.2.8
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index d38a024e14..7549795817 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -691,12 +691,14 @@ dirserv_add_descriptor(routerinfo_t *ri, const char **msg, const char *source) static was_router_added_t dirserv_add_extrainfo(extrainfo_t *ei, const char **msg) { - const routerinfo_t *ri; + routerinfo_t *ri; int r; tor_assert(msg); *msg = NULL; - ri = router_get_by_id_digest(ei->cache_info.identity_digest); + /* Needs to be mutable so routerinfo_incompatible_with_extrainfo + * can mess with some of the flags in ri->cache_info. */ + ri = router_get_mutable_by_digest(ei->cache_info.identity_digest); if (!ri) { *msg = "No corresponding router descriptor for extra-info descriptor"; extrainfo_free(ei); @@ -716,7 +718,8 @@ dirserv_add_extrainfo(extrainfo_t *ei, const char **msg) return ROUTER_BAD_EI; } - if ((r = routerinfo_incompatible_with_extrainfo(ri, ei, NULL, msg))) { + if ((r = routerinfo_incompatible_with_extrainfo(ri->identity_pkey, ei, + &ri->cache_info, msg))) { extrainfo_free(ei); return r < 0 ? ROUTER_IS_ALREADY_KNOWN : ROUTER_BAD_EI; } |