diff options
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 19b8b14b15..01169d2c58 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2864,6 +2864,12 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, } } + if (!in_consensus && from_cache && + router->cache_info.published_on < time(NULL) - OLD_ROUTER_DESC_MAX_AGE) { + *msg = "Router descriptor was really old."; + return -1; + } + /* We haven't seen a router with this identity before. Add it to the end of * the list. */ routerlist_insert(routerlist, router); |