Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #18529

Closed (moved)
Open
Opened Mar 11, 2016 by Nick Mathewson@nickm🐭

Fix duplicate check for "only allow internal addresses if we are on a network with nonstandard authorities"

We have this code in config.c:

  if (tor_addr_is_internal(&myaddr, 0)) {
    /* make sure we're ok with publishing an internal IP */
    if (!options->DirAuthorities && !options->AlternateDirAuthority) {
      /* if they are using the default authorities, disallow internal IPs
       * always. */
      log_fn(warn_severity, LD_CONFIG,
             "Address '%s' resolves to private IP address '%s'. "
             "Tor servers that use the default DirAuthorities must have "
             "public IP addresses.", hostname, addr_string);
      tor_free(addr_string);
      return -1;
    }
...

And we now have this code in router.c (since #17153 (moved)):

        /* Like IPv4, if the relay is configured using the default
         * authorities, disallow internal IPs. Otherwise, allow them. */
        const int default_auth = (!options->DirAuthorities &&
                                  !options->AlternateDirAuthority);
        if (! tor_addr_is_internal(&p->addr, 0) || ! default_auth) {
          ipv6_orport = p;
          break;
...

These two checks are similar and I'd prefer that they be merged when possible.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.9.x-final
Milestone
Tor: 0.2.9.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#18529