I love it!&nbsp; Nice work Karsten!<br><br><br><div class="gmail_quote">On Mon, May 19, 2008 at 2:53 PM, Karsten Loesing &lt;<a href="mailto:karsten.loesing@gmx.net">karsten.loesing@gmx.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br></div>
Hi Nick,<div class="Ih2E3d"><br>
<br>
| What about having a preprocessing step on the options list that<br>
| expands PrivateTorNetwork 1 into the entire list of options it<br>
| implies? It&#39;s not an error to specify an option twice; when you do,<br>
| the second takes precedence.<br>
<br></div>
Hmm, I couldn&#39;t find the right place in the code to implement your idea.<br>
I now solved it differently: When reading configurations from torrc and<br>
the console, Tor checks if TestingTorNetwork was configured. If so,<br>
default values for dependent options are changed and the configuration<br>
is read in again. See lines 3835--3892 in config.c.<br>
<br>
I also added a hook that prevents TestingTorNetwork from being changed<br>
after Tor is started. I could not imagine why this would be useful, and<br>
therefore excluded this possibility to prevent unforeseen errors. See<br>
lines 3463--3468 in config.c.<div class="Ih2E3d"><br>
<br>
| This would mean that RESETCONF wouldn&#39;t do the right thing, though.<br>
| Perhaps a hack like the one in weasel&#39;s debian-tor user patch would<br>
| handle that better. &nbsp;It&#39;s still a hack, but not a totally insane hack.<br>
<br></div>
Right, that&#39;s what I&#39;ve done now.<br>
<br>
<br>
In the proposal I added a section with test cases. These include all<br>
those scenarios about changing configurations that came to my mind.<br>
These tests succeeded in a patched Tor and worked fine with a patched<br>
PuppeTor using v3 directories.<div class="Ih2E3d"><br>
<br>
- --Karsten<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br></div>
iD8DBQFIMfbI0M+WPffBEmURAkHJAJ4pr9yyJ0I9p/iyGbMtHn0cCz3pnACfYy6h<br>
UNzjTYAbHyq4l25rd654+dM=<br>
=PYOt<br>
-----END PGP SIGNATURE-----<br>
<br>Index: /home/karsten/tor/tor-trunk-private-network/src/or/config.c<br>
===================================================================<br>
--- /home/karsten/tor/tor-trunk-private-network/src/or/config.c (revision 14671)<br>
+++ /home/karsten/tor/tor-trunk-private-network/src/or/config.c (working copy)<br>
@@ -174,6 +174,7 @@<br>
 &nbsp; V(DataDirectory, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRING, &nbsp; NULL),<br>
 &nbsp; OBSOLETE(&quot;DebugLogFile&quot;),<br>
 &nbsp; V(DirAllowPrivateAddresses, &nbsp; &nbsp;BOOL, &nbsp; &nbsp; NULL),<br>
+ &nbsp;V(DirTimeToLearnReachability, &nbsp;INTERVAL, &quot;30 minutes&quot;),<br>
 &nbsp; V(DirListenAddress, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LINELIST, NULL),<br>
 &nbsp; OBSOLETE(&quot;DirFetchPeriod&quot;),<br>
 &nbsp; V(DirPolicy, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LINELIST, NULL),<br>
@@ -185,6 +186,7 @@<br>
 &nbsp; V(DownloadExtraInfo, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOOL, &nbsp; &nbsp; &quot;0&quot;),<br>
 &nbsp; V(EnforceDistinctSubnets, &nbsp; &nbsp; &nbsp;BOOL, &nbsp; &nbsp; &quot;1&quot;),<br>
 &nbsp; V(EntryNodes, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;STRING, &nbsp; NULL),<br>
+ &nbsp;V(EstimatedDescriptorPropagationTime, INTERVAL, &quot;10 minutes&quot;),<br>
 &nbsp; V(ExcludeNodes, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;STRING, &nbsp; NULL),<br>
 &nbsp; V(ExitNodes, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRING, &nbsp; NULL),<br>
 &nbsp; V(ExitPolicy, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LINELIST, NULL),<br>
@@ -243,6 +245,7 @@<br>
 &nbsp; V(OutboundBindAddress, &nbsp; &nbsp; &nbsp; &nbsp; STRING, &nbsp; NULL),<br>
 &nbsp; OBSOLETE(&quot;PathlenCoinWeight&quot;),<br>
 &nbsp; V(PidFile, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRING, &nbsp; NULL),<br>
+ &nbsp;V(TestingTorNetwork, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BOOL, &nbsp; &nbsp; &quot;0&quot;),<br>
 &nbsp; V(PreferTunneledDirConns, &nbsp; &nbsp; &nbsp;BOOL, &nbsp; &nbsp; &quot;1&quot;),<br>
 &nbsp; V(ProtocolWarnings, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BOOL, &nbsp; &nbsp; &quot;0&quot;),<br>
 &nbsp; V(PublishServerDescriptor, &nbsp; &nbsp; CSV, &nbsp; &nbsp; &nbsp;&quot;1&quot;),<br>
@@ -297,6 +300,9 @@<br>
 &nbsp; VAR(&quot;V1AuthoritativeDirectory&quot;,BOOL, V1AuthoritativeDir, &nbsp; &quot;0&quot;),<br>
 &nbsp; VAR(&quot;V2AuthoritativeDirectory&quot;,BOOL, V2AuthoritativeDir, &nbsp; &quot;0&quot;),<br>
 &nbsp; VAR(&quot;V3AuthoritativeDirectory&quot;,BOOL, V3AuthoritativeDir, &nbsp; &quot;0&quot;),<br>
+ &nbsp;V(V3AuthInitialVotingInterval, INTERVAL, &quot;30 minutes&quot;),<br>
+ &nbsp;V(V3AuthInitialVoteDelay, &nbsp; &nbsp; &nbsp;INTERVAL, &quot;5 minutes&quot;),<br>
+ &nbsp;V(V3AuthInitialDistDelay, &nbsp; &nbsp; &nbsp;INTERVAL, &quot;5 minutes&quot;),<br>
 &nbsp; V(V3AuthVotingInterval, &nbsp; &nbsp; &nbsp; &nbsp;INTERVAL, &quot;1 hour&quot;),<br>
 &nbsp; V(V3AuthVoteDelay, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTERVAL, &quot;5 minutes&quot;),<br>
 &nbsp; V(V3AuthDistDelay, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTERVAL, &quot;5 minutes&quot;),<br>
@@ -3325,6 +3331,72 @@<br>
 &nbsp; &nbsp; });<br>
 &nbsp; }<br>
<br>
+ &nbsp;if (options-&gt;TestingTorNetwork &amp;&amp; !options-&gt;DirServers) {<br>
+ &nbsp; &nbsp;REJECT(&quot;TestingTorNetwork may only be configured in combination with &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;a non-default set of DirServers.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;V3AuthInitialVotingInterval != 30*60 &amp;&amp;<br>
+ &nbsp; &nbsp; &nbsp;!options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVotingInterval may only be changed in testing &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Tor networks!&quot;);<br>
+ &nbsp;} else if (options-&gt;V3AuthInitialVotingInterval &lt; MIN_VOTE_INTERVAL) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVotingInterval is insanely low.&quot;);<br>
+ &nbsp;} else if (options-&gt;V3AuthInitialVotingInterval &gt; 24*60*60) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVotingInterval is insanely high.&quot;);<br>
+ &nbsp;} else if (((30*60) % options-&gt;V3AuthInitialVotingInterval) != 0) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVotingInterval does not divide evenly into &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;30 minutes.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;V3AuthInitialVoteDelay != 5*60 &amp;&amp;<br>
+ &nbsp; &nbsp; &nbsp;!options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVoteDelay may only be changed in testing &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Tor networks!&quot;);<br>
+ &nbsp;} else if (options-&gt;V3AuthInitialVoteDelay &lt; MIN_VOTE_SECONDS) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVoteDelay is way too low.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;V3AuthInitialDistDelay != 5*60 &amp;&amp;<br>
+ &nbsp; &nbsp; &nbsp;!options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialDistDelay may only be changed in testing &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Tor networks!&quot;);<br>
+ &nbsp;} else if (options-&gt;V3AuthInitialDistDelay &lt; MIN_DIST_SECONDS) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialDistDelay is way too low.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;V3AuthInitialVoteDelay + options-&gt;V3AuthInitialDistDelay &gt;=<br>
+ &nbsp; &nbsp; &nbsp;options-&gt;V3AuthInitialVotingInterval/2) {<br>
+ &nbsp; &nbsp;REJECT(&quot;V3AuthInitialVoteDelay plus V3AuthInitialDistDelay must be &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;less than half V3AuthInitialVotingInterval&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;DirTimeToLearnReachability != 30*60 &amp;&amp; !options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;REJECT(&quot;DirTimeToLearnReachability may only be changed in testing &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Tor networks!&quot;);<br>
+ &nbsp;} else if (options-&gt;DirTimeToLearnReachability &lt; 0) {<br>
+ &nbsp; &nbsp;REJECT(&quot;DirTimeToLearnReachability must be non-negative.&quot;);<br>
+ &nbsp;} else if (options-&gt;DirTimeToLearnReachability &gt; 2*60*60) {<br>
+ &nbsp; &nbsp;COMPLAIN(&quot;DirTimeToLearnReachability is insanely high.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;EstimatedDescriptorPropagationTime != 10*60 &amp;&amp;<br>
+ &nbsp; &nbsp; &nbsp;!options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;REJECT(&quot;EstimatedDescriptorPropagationTime may only be changed in &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;testing Tor networks!&quot;);<br>
+ &nbsp;} else if (options-&gt;EstimatedDescriptorPropagationTime &lt; 0) {<br>
+ &nbsp; &nbsp;REJECT(&quot;EstimatedDescriptorPropagationTime must be non-negative.&quot;);<br>
+ &nbsp;} else if (options-&gt;EstimatedDescriptorPropagationTime &gt; 60*60) {<br>
+ &nbsp; &nbsp;COMPLAIN(&quot;EstimatedDescriptorPropagationTime is insanely high.&quot;);<br>
+ &nbsp;}<br>
+<br>
+ &nbsp;if (options-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;log_warn(LD_CONFIG, &quot;TestingTorNetwork is set. This will make your node &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;almost unusable in the public Tor network, and is &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;therefore only advised if you are building a &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;testing Tor network!&quot;);<br>
+ &nbsp;}<br>
+<br>
 &nbsp; return 0;<br>
&nbsp;#undef REJECT<br>
&nbsp;#undef COMPLAIN<br>
@@ -3388,6 +3460,12 @@<br>
 &nbsp; &nbsp; return -1;<br>
 &nbsp; }<br>
<br>
+ &nbsp;if (old-&gt;TestingTorNetwork != new_val-&gt;TestingTorNetwork) {<br>
+ &nbsp; &nbsp;*msg = tor_strdup(&quot;While Tor is running, changing TestingTorNetwork &quot;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;is not allowed.&quot;);<br>
+ &nbsp; &nbsp;return -1;<br>
+ &nbsp;}<br>
+<br>
 &nbsp; return 0;<br>
&nbsp;}<br>
<br>
@@ -3756,6 +3834,64 @@<br>
 &nbsp; &nbsp; goto err;<br>
 &nbsp; }<br>
<br>
+ &nbsp;/* If this is a testing network configuration, change defaults<br>
+ &nbsp; * for a list of dependent config options, re-initialize newoptions<br>
+ &nbsp; * with the new defaults, and assign all options to it second time. */<br>
+ &nbsp;if (newoptions-&gt;TestingTorNetwork) {<br>
+<br>
+ &nbsp; &nbsp;/* Change defaults. */<br>
+ &nbsp; &nbsp;#define CHANGE_DEFAULT(key, val) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\<br>
+ &nbsp; &nbsp;{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<br>
+ &nbsp; &nbsp; &nbsp;config_var_t *var = config_find_option(&amp;options_format, key); \<br>
+ &nbsp; &nbsp; &nbsp;tor_assert(var); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\<br>
+ &nbsp; &nbsp; &nbsp;var-&gt;initvalue = tor_strdup(val); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \<br>
+ &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;ServerDNSAllowBrokenResolvConf&quot;, &quot;1&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;DirAllowPrivateAddresses&quot;, &quot;1&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;EnforceDistinctSubnets&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;AssumeReachable&quot;, &quot;1&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;AuthDirMaxServersPerAddr&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;AuthDirMaxServersPerAuthAddr&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;ClientDNSRejectInternalAddresses&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;ExitPolicyRejectPrivate&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthVotingInterval&quot;, &quot;300&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthVoteDelay&quot;, &quot;20&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthDistDelay&quot;, &quot;20&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthInitialVotingInterval&quot;, &quot;300&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthInitialVoteDelay&quot;, &quot;20&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;V3AuthInitialDistDelay&quot;, &quot;20&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;DirTimeToLearnReachability&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;CHANGE_DEFAULT(&quot;EstimatedDescriptorPropagationTime&quot;, &quot;0&quot;);<br>
+ &nbsp; &nbsp;#undef CHANGE_DEFAULT<br>
+<br>
+ &nbsp; &nbsp;/* Clear newoptions and re-initialize them with new defaults. */<br>
+ &nbsp; &nbsp;config_free(&amp;options_format, newoptions);<br>
+ &nbsp; &nbsp;newoptions = tor_malloc_zero(sizeof(or_options_t));<br>
+ &nbsp; &nbsp;newoptions-&gt;_magic = OR_OPTIONS_MAGIC;<br>
+ &nbsp; &nbsp;options_init(newoptions);<br>
+ &nbsp; &nbsp;newoptions-&gt;command = command;<br>
+ &nbsp; &nbsp;newoptions-&gt;command_arg = command_arg;<br>
+<br>
+ &nbsp; &nbsp;/* Assign all options a second time. */<br>
+ &nbsp; &nbsp;retval = config_get_lines(cf, &amp;cl);<br>
+ &nbsp; &nbsp;if (retval &lt; 0) {<br>
+ &nbsp; &nbsp; &nbsp;err = SETOPT_ERR_PARSE;<br>
+ &nbsp; &nbsp; &nbsp;goto err;<br>
+ &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;retval = config_assign(&amp;options_format, newoptions, cl, 0, 0, msg);<br>
+ &nbsp; &nbsp;config_free_lines(cl);<br>
+ &nbsp; &nbsp;if (retval &lt; 0) {<br>
+ &nbsp; &nbsp; &nbsp;err = SETOPT_ERR_PARSE;<br>
+ &nbsp; &nbsp; &nbsp;goto err;<br>
+ &nbsp; &nbsp;}<br>
+ &nbsp; &nbsp;retval = config_assign(&amp;options_format, newoptions,<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; global_cmdline_options, 0, 0, msg);<br>
+ &nbsp; &nbsp;if (retval &lt; 0) {<br>
+ &nbsp; &nbsp; &nbsp;err = SETOPT_ERR_PARSE;<br>
+ &nbsp; &nbsp; &nbsp;goto err;<br>
+ &nbsp; &nbsp;}<br>
+ &nbsp;}<br>
+<br>
 &nbsp; /* Validate newoptions */<br>
 &nbsp; if (options_validate(oldoptions, newoptions, 0, msg) &lt; 0) {<br>
 &nbsp; &nbsp; err = SETOPT_ERR_PARSE; /*XXX021 make this separate.*/<br>
Index: /home/karsten/tor/tor-trunk-private-network/src/or/dirserv.c<br>
===================================================================<br>
--- /home/karsten/tor/tor-trunk-private-network/src/or/dirserv.c &nbsp; &nbsp; &nbsp; &nbsp;(revision 14671)<br>
+++ /home/karsten/tor/tor-trunk-private-network/src/or/dirserv.c &nbsp; &nbsp; &nbsp; &nbsp;(working copy)<br>
@@ -2122,10 +2122,6 @@<br>
 &nbsp; &nbsp; router-&gt;is_bad_exit = router-&gt;is_bad_directory = 0;<br>
&nbsp;}<br>
<br>
-/** If we&#39;ve been around for less than this amount of time, our reachability<br>
- * information is not accurate. */<br>
-#define DIRSERV_TIME_TO_GET_REACHABILITY_INFO (30*60)<br>
-<br>
&nbsp;/** Return a new networkstatus_t* containing our current opinion. (For v3<br>
 &nbsp;* authorities) */<br>
&nbsp;networkstatus_t *<br>
@@ -2155,7 +2151,7 @@<br>
 &nbsp; tor_assert(private_key);<br>
 &nbsp; tor_assert(cert);<br>
<br>
- &nbsp;if (now - time_of_process_start &lt; DIRSERV_TIME_TO_GET_REACHABILITY_INFO)<br>
+ &nbsp;if (now - time_of_process_start &lt; options-&gt;DirTimeToLearnReachability)<br>
 &nbsp; &nbsp; vote_on_reachability = 0;<br>
<br>
 &nbsp; if (resolve_my_address(LOG_WARN, options, &amp;addr, &amp;hostname)&lt;0) {<br>
@@ -2241,7 +2237,7 @@<br>
 &nbsp; &nbsp; &nbsp; last_consensus_interval = current_consensus-&gt;fresh_until -<br>
 &nbsp; &nbsp; &nbsp; &nbsp; current_consensus-&gt;valid_after;<br>
 &nbsp; &nbsp; else<br>
- &nbsp; &nbsp; &nbsp;last_consensus_interval = DEFAULT_VOTING_INTERVAL_WHEN_NO_CONSENSUS;<br>
+ &nbsp; &nbsp; &nbsp;last_consensus_interval = options-&gt;V3AuthInitialVotingInterval;<br>
 &nbsp; &nbsp; v3_out-&gt;valid_after =<br>
 &nbsp; &nbsp; &nbsp; dirvote_get_start_of_next_interval(now, (int)last_consensus_interval);<br>
 &nbsp; &nbsp; format_iso_time(tbuf, v3_out-&gt;valid_after);<br>
Index: /home/karsten/tor/tor-trunk-private-network/src/or/dirvote.c<br>
===================================================================<br>
--- /home/karsten/tor/tor-trunk-private-network/src/or/dirvote.c &nbsp; &nbsp; &nbsp; &nbsp;(revision 14671)<br>
+++ /home/karsten/tor/tor-trunk-private-network/src/or/dirvote.c &nbsp; &nbsp; &nbsp; &nbsp;(working copy)<br>
@@ -1300,8 +1300,9 @@<br>
 &nbsp; &nbsp; vote_delay = consensus-&gt;vote_seconds;<br>
 &nbsp; &nbsp; dist_delay = consensus-&gt;dist_seconds;<br>
 &nbsp; } else {<br>
- &nbsp; &nbsp;interval = DEFAULT_VOTING_INTERVAL_WHEN_NO_CONSENSUS;<br>
- &nbsp; &nbsp;vote_delay = dist_delay = 300;<br>
+ &nbsp; &nbsp;interval = options-&gt;V3AuthInitialVotingInterval;<br>
+ &nbsp; &nbsp;vote_delay = options-&gt;V3AuthInitialVoteDelay;<br>
+ &nbsp; &nbsp;dist_delay = options-&gt;V3AuthInitialDistDelay;<br>
 &nbsp; }<br>
<br>
 &nbsp; tor_assert(interval &gt; 0);<br>
Index: /home/karsten/tor/tor-trunk-private-network/src/or/or.h<br>
===================================================================<br>
--- /home/karsten/tor/tor-trunk-private-network/src/or/or.h &nbsp; &nbsp; (revision 14671)<br>
+++ /home/karsten/tor/tor-trunk-private-network/src/or/or.h &nbsp; &nbsp; (working copy)<br>
@@ -2344,6 +2344,31 @@<br>
 &nbsp; &nbsp;* migration purposes? */<br>
 &nbsp; int V3AuthUseLegacyKey;<br>
<br>
+ &nbsp;/** The length of time that we think an initial consensus should be<br>
+ &nbsp; * fresh. */<br>
+ &nbsp;int V3AuthInitialVotingInterval;<br>
+<br>
+ &nbsp;/** The length of time we think it will take to distribute initial<br>
+ &nbsp; * votes. */<br>
+ &nbsp;int V3AuthInitialVoteDelay;<br>
+<br>
+ &nbsp;/** The length of time we think it will take to distribute initial<br>
+ &nbsp; * signatures. */<br>
+ &nbsp;int V3AuthInitialDistDelay;<br>
+<br>
+ &nbsp;/** If an authority has been around for less than this amount of time,<br>
+ &nbsp; * its reachability information is not accurate. */<br>
+ &nbsp;int DirTimeToLearnReachability;<br>
+<br>
+ &nbsp;/** Clients don&#39;t download any descriptor this recent, since it will<br>
+ &nbsp; * probably not have propagated to enough caches. */<br>
+ &nbsp;int EstimatedDescriptorPropagationTime;<br>
+<br>
+ &nbsp;/** If true, we take part in a testing network. Change the defaults of a<br>
+ &nbsp; * couple of other configuration options and allow to change the values<br>
+ &nbsp; * of certain configuration options. */<br>
+ &nbsp;int TestingTorNetwork;<br>
+<br>
 &nbsp; /** File to check for a consensus networkstatus, if we don&#39;t have one<br>
 &nbsp; &nbsp;* cached. */<br>
 &nbsp; char *FallbackNetworkstatusFile;<br>
@@ -3186,9 +3211,6 @@<br>
&nbsp;/** Smallest allowable voting interval. */<br>
&nbsp;#define MIN_VOTE_INTERVAL 300<br>
<br>
-/** If there is no consensus, what interval do we default to? */<br>
-#define DEFAULT_VOTING_INTERVAL_WHEN_NO_CONSENSUS (30*60)<br>
-<br>
&nbsp;void dirvote_free_all(void);<br>
<br>
&nbsp;/* vote manipulation */<br>
Index: /home/karsten/tor/tor-trunk-private-network/src/or/routerlist.c<br>
===================================================================<br>
--- /home/karsten/tor/tor-trunk-private-network/src/or/routerlist.c &nbsp; &nbsp; (revision 14671)<br>
+++ /home/karsten/tor/tor-trunk-private-network/src/or/routerlist.c &nbsp; &nbsp; (working copy)<br>
@@ -3673,10 +3673,6 @@<br>
 &nbsp; tor_free(resource);<br>
&nbsp;}<br>
<br>
-/** Clients don&#39;t download any descriptor this recent, since it will probably<br>
- * not have propagated to enough caches. */<br>
-#define ESTIMATED_PROPAGATION_TIME (10*60)<br>
-<br>
&nbsp;/** Return 0 if this routerstatus is obsolete, too new, isn&#39;t<br>
 &nbsp;* running, or otherwise not a descriptor that we would make any<br>
 &nbsp;* use of even if we had it. Else return 1. */<br>
@@ -3688,7 +3684,7 @@<br>
 &nbsp; &nbsp; &nbsp;* But, if we want to have a complete list, fetch it anyway. */<br>
 &nbsp; &nbsp; return 0;<br>
 &nbsp; }<br>
- &nbsp;if (rs-&gt;published_on + ESTIMATED_PROPAGATION_TIME &gt; now) {<br>
+ &nbsp;if (rs-&gt;published_on + options-&gt;EstimatedDescriptorPropagationTime &gt; now) {<br>
 &nbsp; &nbsp; /* Most caches probably don&#39;t have this descriptor yet. */<br>
 &nbsp; &nbsp; return 0;<br>
 &nbsp; }<br>
<br>
<br></blockquote></div><br>