Opened 4 years ago

Closed 4 years ago

#17863 closed enhancement (fixed)

Fixes to IPv6 address handling

Reported by: teor 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

I've made some fixes to IPv6 address handling:

  • make address policy assume_action work for []-quoted IPv6 addresses
    • unquoted addresses are ambiguous, because of the port separator ":", and "accept" starting with 4 hex digits
  • limit IPv6 mask bits to 128
  • warn when comparing against an AF_UNSPEC address in a policy
    • no code wants this to happen, and it produces unexpected results

Branch coming soon.

Child Tickets

Change History (2)

comment:1 Changed 4 years ago by teor

Status: newneeds_review

Also:

  • set malformed_list to 0 each time we parse a policy item

See my branch feature17863 at https://github.com/teor2345/tor.git

comment:2 Changed 4 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

cd0a5db5e9ffbe873fba1a0f4965cdd008824247:

  • this one changes the behavior of router_parse_addr_policy_item_from_string. The documentation should change to remove "If there is a policy error" from the docstring.

Everything else looks good. This change is minor, so I'll make it after merging.

Note: See TracTickets for help on using tickets.