Browse Source

Rename HSLayer{2,3}Nodes to start without an underscore.

The old single-underscore names remain as a deprecated synonym.

Fixes bug 25581; bugfix on 0.3.3.1-alpha.
Nick Mathewson 6 years ago
parent
commit
8b8630a501
3 changed files with 19 additions and 12 deletions
  1. 4 0
      changes/bug25581
  2. 10 10
      doc/tor.1.txt
  3. 5 2
      src/or/config.c

+ 4 - 0
changes/bug25581

@@ -0,0 +1,4 @@
+  o Minor bugfixes (configuration):
+    - Remove undescores from the _HSLayer{2,3}Nodes options. This expert-user
+      configuration can now be enabled as HSLayer{2,3}Nodes. Fixes bug 25581;
+      bugfix on 0.3.3.1-alpha

+ 10 - 10
doc/tor.1.txt

@@ -1532,7 +1532,7 @@ The following options are useful only for clients (that is, if
     If no nodes in Tor2webRendezvousPoints are currently available for
     If no nodes in Tor2webRendezvousPoints are currently available for
     use, Tor will choose a random node when building HS circuits.
     use, Tor will choose a random node when building HS circuits.
 
 
-[[_HSLayer2Nodes]] **_HSLayer2Nodes** __node__,__node__,__...__::
+[[HSLayer2Nodes]] **HSLayer2Nodes** __node__,__node__,__...__::
     A list of identity fingerprints, nicknames, country codes, and
     A list of identity fingerprints, nicknames, country codes, and
     address patterns of nodes that are allowed to be used as the
     address patterns of nodes that are allowed to be used as the
     second hop in all client or service-side Onion Service circuits.
     second hop in all client or service-side Onion Service circuits.
@@ -1542,7 +1542,7 @@ The following options are useful only for clients (that is, if
     (Default: Any node in the network may be used in the second hop.)
     (Default: Any node in the network may be used in the second hop.)
  +
  +
     (Example:
     (Example:
-    _HSLayer2Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, \{cc}, 255.254.0.0/8) +
+    HSLayer2Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, \{cc}, 255.254.0.0/8) +
  +
  +
     When this is set, the resulting hidden service paths will
     When this is set, the resulting hidden service paths will
     look like:
     look like:
@@ -1559,7 +1559,7 @@ The following options are useful only for clients (that is, if
     Rend, HSDir, and Intro point selection is not affected by this
     Rend, HSDir, and Intro point selection is not affected by this
     option.
     option.
  +
  +
-    This option may be combined with _HSLayer3Nodes to create
+    This option may be combined with HSLayer3Nodes to create
     paths of the form:
     paths of the form:
  +
  +
         C - G - L2 - L3 - Rend +
         C - G - L2 - L3 - Rend +
@@ -1569,7 +1569,7 @@ The following options are useful only for clients (that is, if
         S - G - L2 - L3 - HSDir +
         S - G - L2 - L3 - HSDir +
         S - G - L2 - L3 - Intro +
         S - G - L2 - L3 - Intro +
  +
  +
-    ExcludeNodes have higher priority than _HSLayer2Nodes,
+    ExcludeNodes have higher priority than HSLayer2Nodes,
     which means that nodes specified in ExcludeNodes will not be
     which means that nodes specified in ExcludeNodes will not be
     picked.
     picked.
  +
  +
@@ -1577,10 +1577,10 @@ The following options are useful only for clients (that is, if
     https://github.com/mikeperry-tor/vanguards that selects and
     https://github.com/mikeperry-tor/vanguards that selects and
     updates this set of nodes for you. Hence it does not do load
     updates this set of nodes for you. Hence it does not do load
     balancing if fewer than 20 nodes are selected, and if no nodes in
     balancing if fewer than 20 nodes are selected, and if no nodes in
-    _HSLayer2Nodes are currently available for use, Tor will not work.
+    HSLayer2Nodes are currently available for use, Tor will not work.
     Please use extreme care if you are setting this option manually.
     Please use extreme care if you are setting this option manually.
 
 
-[[_HSLayer3Nodes]] **_HSLayer3Nodes** __node__,__node__,__...__::
+[[HSLayer3Nodes]] **HSLayer3Nodes** __node__,__node__,__...__::
     A list of identity fingerprints, nicknames, country codes, and
     A list of identity fingerprints, nicknames, country codes, and
     address patterns of nodes that are allowed to be used as the
     address patterns of nodes that are allowed to be used as the
     third hop in all client and service-side Onion Service circuits.
     third hop in all client and service-side Onion Service circuits.
@@ -1590,7 +1590,7 @@ The following options are useful only for clients (that is, if
     (Default: Any node in the network may be used in the third hop.)
     (Default: Any node in the network may be used in the third hop.)
  +
  +
     (Example:
     (Example:
-    _HSLayer3Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, \{cc}, 255.254.0.0/8) +
+    HSLayer3Nodes ABCD1234CDEF5678ABCD1234CDEF5678ABCD1234, \{cc}, 255.254.0.0/8) +
  +
  +
     When this is set by itself, the resulting hidden service paths
     When this is set by itself, the resulting hidden service paths
     will look like: +
     will look like: +
@@ -1606,7 +1606,7 @@ The following options are useful only for clients (that is, if
     option.
     option.
  +
  +
     While it is possible to use this option by itself, it should be
     While it is possible to use this option by itself, it should be
-    combined with _HSLayer2Nodes to create paths of the form:
+    combined with HSLayer2Nodes to create paths of the form:
  +
  +
         C - G - L2 - L3 - Rend +
         C - G - L2 - L3 - Rend +
         C - G - L2 - L3 - M - HSDir +
         C - G - L2 - L3 - M - HSDir +
@@ -1615,7 +1615,7 @@ The following options are useful only for clients (that is, if
         S - G - L2 - L3 - HSDir +
         S - G - L2 - L3 - HSDir +
         S - G - L2 - L3 - Intro +
         S - G - L2 - L3 - Intro +
  +
  +
-    ExcludeNodes have higher priority than _HSLayer3Nodes,
+    ExcludeNodes have higher priority than HSLayer3Nodes,
     which means that nodes specified in ExcludeNodes will not be
     which means that nodes specified in ExcludeNodes will not be
     picked.
     picked.
   +
   +
@@ -1623,7 +1623,7 @@ The following options are useful only for clients (that is, if
     https://github.com/mikeperry-tor/vanguards that selects and
     https://github.com/mikeperry-tor/vanguards that selects and
     updates this set of nodes for you. Hence it does not do load
     updates this set of nodes for you. Hence it does not do load
     balancing if fewer than 20 nodes are selected, and if no nodes in
     balancing if fewer than 20 nodes are selected, and if no nodes in
-    _HSLayer3Nodes are currently available for use, Tor will not work.
+    HSLayer3Nodes are currently available for use, Tor will not work.
     Please use extreme care if you are setting this option manually.
     Please use extreme care if you are setting this option manually.
 
 
 [[UseMicrodescriptors]] **UseMicrodescriptors** **0**|**1**|**auto**::
 [[UseMicrodescriptors]] **UseMicrodescriptors** **0**|**1**|**auto**::

+ 5 - 2
src/or/config.c

@@ -172,6 +172,9 @@ static config_abbrev_t option_abbrevs_[] = {
   { "HashedControlPassword", "__HashedControlSessionPassword", 1, 0},
   { "HashedControlPassword", "__HashedControlSessionPassword", 1, 0},
   { "VirtualAddrNetwork", "VirtualAddrNetworkIPv4", 0, 0},
   { "VirtualAddrNetwork", "VirtualAddrNetworkIPv4", 0, 0},
   { "SocksSocketsGroupWritable", "UnixSocksGroupWritable", 0, 1},
   { "SocksSocketsGroupWritable", "UnixSocksGroupWritable", 0, 1},
+  { "_HSLayer2Nodes", "HSLayer2Nodes", 0, 1 },
+  { "_HSLayer3Nodes", "HSLayer3Nodes", 0, 1 },
+
   { NULL, NULL, 0, 0},
   { NULL, NULL, 0, 0},
 };
 };
 
 
@@ -419,8 +422,8 @@ static config_var_t option_vars_[] = {
   V(Socks5ProxyPassword,         STRING,   NULL),
   V(Socks5ProxyPassword,         STRING,   NULL),
   VAR("KeyDirectory",            FILENAME, KeyDirectory_option, NULL),
   VAR("KeyDirectory",            FILENAME, KeyDirectory_option, NULL),
   V(KeyDirectoryGroupReadable,   BOOL,     "0"),
   V(KeyDirectoryGroupReadable,   BOOL,     "0"),
-  VAR("_HSLayer2Nodes",          ROUTERSET,  HSLayer2Nodes,  NULL),
-  VAR("_HSLayer3Nodes",          ROUTERSET,  HSLayer3Nodes,  NULL),
+  VAR("HSLayer2Nodes",           ROUTERSET,  HSLayer2Nodes,  NULL),
+  VAR("HSLayer3Nodes",           ROUTERSET,  HSLayer3Nodes,  NULL),
   V(KeepalivePeriod,             INTERVAL, "5 minutes"),
   V(KeepalivePeriod,             INTERVAL, "5 minutes"),
   V(KeepBindCapabilities,            AUTOBOOL, "auto"),
   V(KeepBindCapabilities,            AUTOBOOL, "auto"),
   VAR("Log",                     LINELIST, Logs,             NULL),
   VAR("Log",                     LINELIST, Logs,             NULL),