mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'origin/maint-0.2.6'
This commit is contained in:
commit
c0c0a6085e
7
changes/ticket8243
Normal file
7
changes/ticket8243
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
o Minor feature:
|
||||||
|
- The HSDir flag given by authorities now requires the Stable flag. For
|
||||||
|
the current network, this results in going from 2887 to 2806 HSDirs.
|
||||||
|
Also, it makes it harder for an attacker to launch a sybil attack by
|
||||||
|
raising the effort for a relay to become Stable which takes at the
|
||||||
|
very least 7 days to do so and by keeping the 96 hours uptime
|
||||||
|
requirement for HSDir. Implements ticket #8243.
|
@ -1342,8 +1342,9 @@ dirserv_thinks_router_is_unreliable(time_t now,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Return true iff <b>router</b> should be assigned the "HSDir" flag.
|
/** Return true iff <b>router</b> should be assigned the "HSDir" flag.
|
||||||
* Right now this means it advertises support for it, it has a high
|
* Right now this means it advertises support for it, it has a high uptime,
|
||||||
* uptime, it has a DirPort open, and it's currently considered Running.
|
* it has a DirPort open, it has the Stable flag and it's currently
|
||||||
|
* considered Running.
|
||||||
*
|
*
|
||||||
* This function needs to be called after router-\>is_running has
|
* This function needs to be called after router-\>is_running has
|
||||||
* been set.
|
* been set.
|
||||||
@ -1370,6 +1371,7 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
|
|||||||
uptime = real_uptime(router, now);
|
uptime = real_uptime(router, now);
|
||||||
|
|
||||||
return (router->wants_to_be_hs_dir && router->dir_port &&
|
return (router->wants_to_be_hs_dir && router->dir_port &&
|
||||||
|
node->is_stable &&
|
||||||
uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
|
uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
|
||||||
router_is_active(router, node, now));
|
router_is_active(router, node, now));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user