Opened 4 years ago

Closed 4 years ago

#18051 closed defect (fixed)

directory_send_command should decorate IPv6 addresses to avoid port ambiguity

Reported by: teor Owned by: malekbr
Priority: High Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: ipv6, easy, intro
Cc: Actual Points:
Parent ID: #17811 Points: small
Reviewer: Sponsor:

Description

In #17573, we discovered that directory_send_command doesn't quote IPv6 addresses in directory URLs. This could cause issues with the ":port" suffix for directories that aren't on the default port 80.

Child Tickets

Change History (10)

comment:1 Changed 4 years ago by nickm

Priority: MediumHigh

comment:2 Changed 4 years ago by teor

Parent ID: #17811

It's worth noting that IPv6 client bootstrap works as-is (because they use tunneled requests?), so this task may only be required for relays (which use direct connections).

But I might have this the wrong way around.
I'm still not quite sure when we build a HTTP URL for directory requests.
Can someone confirm this?

We can move it to 0.2.9 if needed, but it's easy, so let's try to fix it in 0.2.8.

comment:3 Changed 4 years ago by nickm

Keywords: intro added

comment:4 Changed 4 years ago by nickm

Points: small

comment:5 Changed 4 years ago by malekbr

Owner: set to malekbr
Status: newaccepted

comment:6 Changed 4 years ago by malekbr

Repo : https://github.com/malekbr/tor
Branch : decorated_ipv6_directory_send_command

Was not tested, just made sure it doesn't break and runs.

comment:7 Changed 4 years ago by malekbr

Status: acceptedneeds_review

comment:8 in reply to:  6 Changed 4 years ago by teor

Replying to malekbr:

Repo : https://github.com/malekbr/tor
Branch : decorated_ipv6_directory_send_command

Was not tested, just made sure it doesn't break and runs.

Thanks for this patch, it looks good.

I noticed some other things we might want to fix eventually, see #18276.

Testing this needs an IPv6 tor client (#17840) connecting to an IPv6 tor directory server through an IPv6-aware/IPv6-transparent proxy.

I've checked that it doesn't break the IPv6 bootstrap code in #17840 on an IPv6-only system, with and without bridges. On this basis, I'd be happy to see it merged.

comment:9 Changed 4 years ago by nickm

Squashed and merged!

comment:10 Changed 4 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.