Refactor UseEntryNodes so the original configured value is preserved
commit41f96078c23e3ef1c39a853841332cac3e133a94
authorteor <teor2345@gmail.com>
Tue, 6 Sep 2016 06:22:07 +0000 (6 16:22 +1000)
committerNick Mathewson <nickm@torproject.org>
Tue, 13 Sep 2016 14:13:56 +0000 (13 10:13 -0400)
tree199e75ee2649d7421ee855e31ef2252c74ee57f1
parent0285f4f34d72b2b77f36fd55fa46216f6b54efc4
Refactor UseEntryNodes so the original configured value is preserved

Parse the value to UseEntryNodes_option, then set UseEntryNodes before
validating options.

This way, Authorities, Tor2web, and Single Onion Services don't write
spurious "UseEntryNodes 0" lines to their configs. Document the fact that
these tor configurations ignore UseEntryNodes in the manual page.

Also reorder options validation so we modify UseEntryNodes first, then
check its value against EntryNodes.

And silence a warning about disabled UseEntryNodes for hidden services
when we're actually in non-anonymous single onion service mode.
changes/feature17178
doc/tor.1.txt
src/or/config.c
src/or/or.h