[proposal 136] Re: Proposal: Simplify Configuration of Private Tor Networks
Karsten Loesing
karsten.loesing at gmx.net
Fri May 30 00:17:15 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Nick,
| This looks pretty good to me. There are a few
| issues remaining; let me know if you'd like me to fix them
| myself, or if you'd like to do it.
I tried to address these issues with the attached patch.
| The biggest issue is that there's no documentation for these new
| options in the manpage. They probably want a new section of their
| own, since they're only useful for testing.
Done. I also fixed some minor issues in the existing manpage---mostly
formattings and not worth a separate patch.
|> + if (options->V3AuthInitialVotingInterval != 30*60 &&
|> + !options->TestingTorNetwork) {
|
| Hmmm. I don't like encoding the default explicitly in two places.
| It's not obvious above that if somebody changes the default from "30
| minutes" they also need to change the test here. The long-term fix is
| probably a more general config_is_default() function, but for now I
| don't see a trivial fix.
Hmm, true, this could get nasty if someone changes one place, but misses
the other. I added comments at both places. The third place is the
manpage that needs to be kept synchronous, too.
|> + } else if (options->V3AuthInitialVotingInterval > 24*60*60) {
|> + REJECT("V3AuthInitialVotingInterval is insanely high.");
|
| This test is redundant with the test below; there isn't much reason to
| say "too high" for everything over a day, and "doesn't divide 30
| minutes evenly" for everything between 31 minutes and a day.
|
|> + } else if (((30*60) % options->V3AuthInitialVotingInterval) != 0) {
|> + REJECT("V3AuthInitialVotingInterval does not divide evenly into "
|> + "30 minutes.");
|> + }
Heh. Removed the first test.
| Wow. This whole "parse it twice" business is a little hackish, but I
| don't see a better way to do it offhand, so I'll not argue.
Hmm, I don't see a better solution here, either. :/
- --Karsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIP0eL0M+WPffBEmURAg+yAKC/MKx8fdhkGAhNVovvyFkRzB1oPwCgnWv1
2WMNI54rP7twM1OyaRn0Ezw=
=IKC3
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch4.txt
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080530/79e4beb8/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch4.txt.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080530/79e4beb8/attachment.obj>
More information about the tor-dev
mailing list