Opened 4 years ago

Closed 4 years ago

#17327 closed enhancement (implemented)

DirAuthority IPv6

Reported by: svirus Owned by:
Priority: Medium Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: ipv6
Cc: Actual Points:
Parent ID: #17811 Points:
Reviewer: Sponsor:

Description

When I try set DirAuthority to IPv6 like that:

DirAuthority xxxxx orport=5000 no-v2  v3ident=xxxxxxxxxxxxxxxxxxx [xxx:xxxx:xxxx:xxxx:xxxx:xxxxx:xxxx:xxxx]:7000 fingerxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I see error in stdout:
Oct 12 16:04:44.091 [warn] Unrecognized flag

Oct 12 16:04:44.091 [warn] Unrecognized flag '[xxx:xxxx:xxxx:xxxx:xxxx:xxxxx:xxxx:xxxx]:7000' on DirAuthority line
Oct 12 16:04:44.091 [warn] Unrecognized flag 'fingerxxxxxxxxxxxxxxxxxxxxxxxxx' on DirAuthority line

Child Tickets

Change History (13)

comment:1 Changed 4 years ago by svirus

Component: - Select a componentTor
Priority: MediumHigh
Severity: Normal

comment:2 Changed 4 years ago by teor

Parent ID: #6027

DirAuthority lines currently don't support IPv6.

This is part of the changes in #6027.

comment:3 Changed 4 years ago by teor

Parent ID: #6027

comment:4 Changed 4 years ago by teor

See nickm/bug6027_rebased for code that might be useful here.

comment:5 Changed 4 years ago by teor

Keywords: ipv6 added
Parent ID: #17811

comment:6 Changed 4 years ago by teor

Milestone: Tor: 0.2.8.x-final
Priority: HighMedium
Status: newneeds_review
Type: defectenhancement

Please see my branch feature17327-v2 on https://github.com/teor2345/tor.git

It contains:

  • 616cfb72bf: a rebased 043874ee2e from nickm/bug6027_rebased
    • Add a new ipv6=address:orport flag to DirAuthority and FallbackDir
    • tor.1.txt required a manual merge to update to the latest man page layout
  • a53ebf3a9b: Authorities on IPv6: minor fixes and unit tests
  • 9dd5ef2480: Add IPv6 addresses & orports to the default directory authorities
  • 61a1ead790: Document IPv4 and IPv6 DirPorts
    • Tor assumes that the IPv4 dirport is also available on the relay's IPv6 address. (Or, at least, it will when I'm done.)

The unit tests check that:

  • IPv6 and non-IPv6 authorities and fallbacks work
  • the default authorities and fallbacks load correctly

These changes are compatible with the latest code in #15775 - feature15775-fallback-v9.
When this code is run on the list of fallback directories attached to #15775, they all parse correctly.

Please note that Tor doesn't use these new IPv6 addresses and ports yet.
(#17281 will modify Tor clients to use these new IPv6 addresses to bootstrap.)

comment:7 Changed 4 years ago by teor

I have updated this branch to unit test parsing an authority line and a fallback line, with and without an IPv6 flag. I've also removed a comment typo fix that had nothing to do with the patch.

See my branch feature17327-v3:

  • a53ebf3a9b has been modified to cf6e221bd8
  • all other commits are the same (but the hashes of subsequent commits have changed)

comment:8 Changed 4 years ago by teor

(Also added a changes file as another commit to feature17327-v3.)

comment:9 Changed 4 years ago by teor

The commits on this branch didn't rebase correctly onto master.
I've rebased the branch and squashed the changes file and some fixups.

Please see feature17327-v4:

  • Add a new ipv6=address:orport flag to DirAuthority and FallbackDir
    • a rebased 043874ee2e from nickm/bug6027_rebased
    • tor.1.txt required a manual merge to update to the latest man page layout and context
  • Authorities on IPv6: minor fixes and unit tests
  • Add IPv6 addresses & orports to the default directory authorities
    • If they have them in their descriptor on Globe

(I dropped "Document IPv4 and IPv6 DirPorts", as it belongs in #17840 where those changes are actually being made.)

comment:10 Changed 4 years ago by nickm

Code looks good to me. If I understand correctly, this would mean that clients *know* ipv6 addresses for fallbacks and authorities ... but not that they'd actually be able to use them yet. Am I right or missing something?

comment:11 in reply to:  10 Changed 4 years ago by teor

Replying to nickm:

Code looks good to me. If I understand correctly, this would mean that clients *know* ipv6 addresses for fallbacks and authorities ... but not that they'd actually be able to use them yet. Am I right or missing something?

Yes, the directory code only considers IPv4 addresses at the moment.
I'm working on making it consider IPv6 addresses in #17840.

But feature17327-v4 can merge in the interim, as any features that relate to authorities/fallbacks on IPv6 depend on the ipv6 fields this patch provides.

comment:12 Changed 4 years ago by teor

(In particular, I'd like to see #16774 revised to display authority and fallback IPv6 addresses. It depends on this feature being merged.)

comment:13 Changed 4 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Right, that sounds fine. Merging feature17327-v4

Note: See TracTickets for help on using tickets.