Ticket #13163: 02-AlternateAuthorities-restrict-to-declared-type.patch

File 02-AlternateAuthorities-restrict-to-declared-type.patch, 1011 bytes (added by teor, 6 years ago)

Optional - restrict alternate authorities declared as dir to dir types, and bridge to bridge type (is this even ok?)

  • src/or/config.c

    diff --git a/src/or/config.c b/src/or/config.c
    index 10af92a..42b9a2a 100644
    a b consider_adding_dir_servers(const or_options_t *options, 
    993996    add_default_fallback_dir_servers();
    994997
    995998  for (cl = options->DirAuthorities; cl; cl = cl->next)
    996     if (parse_dir_authority_line(cl->value, NO_DIRINFO, 0)<0)
     999    if (parse_dir_authority_line(cl->value, ALL_DIRINFO, 0)<0)
    9971000      return -1;
    9981001  for (cl = options->AlternateBridgeAuthority; cl; cl = cl->next)
    999     if (parse_dir_authority_line(cl->value, NO_DIRINFO, 0)<0)
     1002    if (parse_dir_authority_line(cl->value, BRIDGE_DIRINFO, 0)<0)
    10001003      return -1;
    10011004  for (cl = options->AlternateDirAuthority; cl; cl = cl->next)
    1002     if (parse_dir_authority_line(cl->value, NO_DIRINFO, 0)<0)
     1005    if (parse_dir_authority_line(cl->value, V3_DIRINFO | EXTRAINFO_DIRINFO | MICRODESC_DIRINFO, 0)<0)
    10031006      return -1;
    10041007  for (cl = options->FallbackDir; cl; cl = cl->next)
    10051008    if (parse_dir_fallback_line(cl->value, 0)<0)