mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Make the guard lifetime configurable and adjustable via the consensus
Fixes 8240. (Don't actually increase the default guard lifetime. It seems likely to break too many things if done precipitiously.)
This commit is contained in:
@@ -173,6 +173,17 @@ int n_bits_set_u8(uint8_t v);
|
||||
* overflow. */
|
||||
#define CEIL_DIV(a,b) (((a)+(b)-1)/(b))
|
||||
|
||||
/* Return <b>v</b> if it's between <b>min</b> and <b>max</b>. Otherwise
|
||||
* return <b>min</b> if <b>v</b> is smaller than <b>min</b>, or <b>max</b> if
|
||||
* <b>b</b> is larger than <b>max</b>.
|
||||
*
|
||||
* Requires that <b>min</b> is no more than <b>max</b>. May evaluate any of
|
||||
* its arguments more than once! */
|
||||
#define CLAMP(min,v,max) \
|
||||
( ((v) < (min)) ? (min) : \
|
||||
((v) > (max)) ? (max) : \
|
||||
(v) )
|
||||
|
||||
/* String manipulation */
|
||||
|
||||
/** Allowable characters in a hexadecimal string. */
|
||||
|
||||
Reference in New Issue
Block a user