Ticket #10124: bug10124.patch

File bug10124.patch, 5.3 KB (added by sqrt2, 6 years ago)
  • new file changes/bug10124

    diff --git a/changes/bug10124 b/changes/bug10124
    new file mode 100644
    index 0000000..95b0838
    - +  
     1  o Documentation:
     2    - Replace remaining references to DirServer in man page and
     3      log entries. Resolves ticket 10124.
  • doc/tor.1.txt

    diff --git a/doc/tor.1.txt b/doc/tor.1.txt
    index 215ea0c..5e8121a 100644
    a b The following options are useful only for clients (that is, if 
    641641[[Bridge]] **Bridge** [__transport__] __IP__:__ORPort__ [__fingerprint__]::
    642642    When set along with UseBridges, instructs Tor to use the relay at
    643643    "IP:ORPort" as a "bridge" relaying into the Tor network. If "fingerprint"
    644     is provided (using the same format as for DirServer), we will verify that
     644    is provided (using the same format as for DirAuthority), we will verify that
    645645    the relay running at that location has the right fingerprint. We also use
    646646    fingerprint to look up the bridge descriptor at the bridge authority, if
    647647    it's provided and if UpdateBridgesFromAuthority is set too.  +
    The following options are used for running a testing Tor network. 
    20262026[[TestingTorNetwork]] **TestingTorNetwork** **0**|**1**::
    20272027    If set to 1, Tor adjusts default values of the configuration options below,
    20282028    so that it is easier to set up a testing Tor network. May only be set if
    2029     non-default set of DirServers is set. Cannot be unset while Tor is running.
     2029    non-default set of DirAuthorities is set. Cannot be unset while Tor is
     2030    running.
    20302031    (Default: 0) +
    20312032
    20322033       ServerDNSAllowBrokenConfig 1
  • src/or/config.c

    diff --git a/src/or/config.c b/src/or/config.c
    index 14e8f9a..310b05b 100644
    a b options_validate(or_options_t *old_options, or_options_t *options, 
    33513351        (options->AlternateDirAuthority &&
    33523352         options->AlternateBridgeAuthority))) {
    33533353    REJECT("TestingTorNetwork may only be configured in combination with "
    3354            "a non-default set of DirServer or both of AlternateDirAuthority "
     3354           "a non-default set of DirAuthority or both of AlternateDirAuthority "
    33553355           "and AlternateBridgeAuthority configured.");
    33563356  }
    33573357
    parse_dir_authority_line(const char *line, dirinfo_type_t required_type, 
    49924992  smartlist_split_string(items, line, NULL,
    49934993                         SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, -1);
    49944994  if (smartlist_len(items) < 1) {
    4995     log_warn(LD_CONFIG, "No arguments on DirServer line.");
     4995    log_warn(LD_CONFIG, "No arguments on DirAuthority line.");
    49964996    goto err;
    49974997  }
    49984998
    parse_dir_authority_line(const char *line, dirinfo_type_t required_type, 
    50205020      char *portstring = flag + strlen("orport=");
    50215021      or_port = (uint16_t) tor_parse_long(portstring, 10, 1, 65535, &ok, NULL);
    50225022      if (!ok)
    5023         log_warn(LD_CONFIG, "Invalid orport '%s' on DirServer line.",
     5023        log_warn(LD_CONFIG, "Invalid orport '%s' on DirAuthority line.",
    50245024                 portstring);
    50255025    } else if (!strcmpstart(flag, "weight=")) {
    50265026      int ok;
    parse_dir_authority_line(const char *line, dirinfo_type_t required_type, 
    50345034      char *idstr = flag + strlen("v3ident=");
    50355035      if (strlen(idstr) != HEX_DIGEST_LEN ||
    50365036          base16_decode(v3_digest, DIGEST_LEN, idstr, HEX_DIGEST_LEN)<0) {
    5037         log_warn(LD_CONFIG, "Bad v3 identity digest '%s' on DirServer line",
     5037        log_warn(LD_CONFIG, "Bad v3 identity digest '%s' on DirAuthority line",
    50385038                 flag);
    50395039      } else {
    50405040        type |= V3_DIRINFO|EXTRAINFO_DIRINFO|MICRODESC_DIRINFO;
    50415041      }
    50425042    } else {
    5043       log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirServer line",
     5043      log_warn(LD_CONFIG, "Unrecognized flag '%s' on DirAuthority line",
    50445044               flag);
    50455045    }
    50465046    tor_free(flag);
    parse_dir_authority_line(const char *line, dirinfo_type_t required_type, 
    50525052    type &= ~V2_DIRINFO;
    50535053
    50545054  if (smartlist_len(items) < 2) {
    5055     log_warn(LD_CONFIG, "Too few arguments to DirServer line.");
     5055    log_warn(LD_CONFIG, "Too few arguments to DirAuthority line.");
    50565056    goto err;
    50575057  }
    50585058  addrport = smartlist_get(items, 0);
    50595059  smartlist_del_keeporder(items, 0);
    50605060  if (addr_port_lookup(LOG_WARN, addrport, &address, NULL, &dir_port)<0) {
    5061     log_warn(LD_CONFIG, "Error parsing DirServer address '%s'", addrport);
     5061    log_warn(LD_CONFIG, "Error parsing DirAuthority address '%s'", addrport);
    50625062    goto err;
    50635063  }
    50645064  if (!dir_port) {
    5065     log_warn(LD_CONFIG, "Missing port in DirServer address '%s'",addrport);
     5065    log_warn(LD_CONFIG, "Missing port in DirAuthority address '%s'",addrport);
    50665066    goto err;
    50675067  }
    50685068
    50695069  fingerprint = smartlist_join_strings(items, "", 0, NULL);
    50705070  if (strlen(fingerprint) != HEX_DIGEST_LEN) {
    5071     log_warn(LD_CONFIG, "Key digest '%s' for DirServer is wrong length %d.",
     5071    log_warn(LD_CONFIG, "Key digest '%s' for DirAuthority is wrong length %d.",
    50725072             fingerprint, (int)strlen(fingerprint));
    50735073    goto err;
    50745074  }
    parse_dir_authority_line(const char *line, dirinfo_type_t required_type, 
    50815081    goto err;
    50825082  }
    50835083  if (base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN)<0) {
    5084     log_warn(LD_CONFIG, "Unable to decode DirServer key digest.");
     5084    log_warn(LD_CONFIG, "Unable to decode DirAuthority key digest.");
    50855085    goto err;
    50865086  }
    50875087