Opened 5 years ago

Last modified 9 months ago

#7482 needs_revision defect

Discard nonsense in address.c about v4-mapped addresses

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-client, ipv6 refactor code-removal
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Right now, some but not all places in address.c do strange contortions to treat ::ffff:1.2.3.4 as equivalent to 1.2.3.4. Instead, we should be rejecting these addresses as private, rather than trying to pretend that we support them.

Child Tickets

Change History (11)

comment:1 Changed 5 years ago by nickm

Status: newneeds_review

branch "bug7482" in my public repository.

comment:2 in reply to:  1 Changed 5 years ago by andrea

Replying to nickm:

branch "bug7482" in my public repository.

This looks good.

comment:3 Changed 5 years ago by nickm

Great! (I missed that you'd reviewed this one.)

This changes "internal" and "private", but the reasons that mustn't happen seem not to apply to IPv6, I think. I want to take another look at #7971 and #5166 before I merge this, though.

comment:4 Changed 5 years ago by sysrqb

Status: needs_reviewneeds_revision

I guess we were both looking at this at the same time. This patch looks reasonable for this bug. The only improvements I have are to mention that ::ffff:1.2.3.4 is treated as internal in the block comment for tor_addr_is_internal_ and to add another clarifying comment at ~340 when you check this case, similar to the case above and below it when you check the RFC compliant addresses.

As for the internal vs private, in this case they're being lumped together, so I think you can change private_nets to internal_nets or local_nets or similar.

comment:5 Changed 5 years ago by andrea

Milestone: Tor: 0.2.4.x-finalTor: 0.2.5.x-final

comment:6 Changed 4 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final

Moving nearly all needs_revision tickets into 0.2.6, as now untimely for 0.2.5.

comment:7 Changed 3 years ago by nickm

Milestone: Tor: 0.2.6.x-finalTor: 0.2.???

Nice to do, doesn't have to be for this release.

comment:8 Changed 15 months ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:9 Changed 14 months ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:10 Changed 9 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:11 Changed 9 months ago by nickm

Keywords: refactor code-removal added
Severity: Normal
Note: See TracTickets for help on using tickets.