Opened 2 years ago

Last modified 23 months ago

#20919 new defect

Extract prop271 state-parsing code into a generic thing

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: torrc configuration technical-debt
Cc: Actual Points:
Parent ID: #20822 Points: 3
Reviewer: Sponsor:

Description


Child Tickets

Change History (6)

comment:1 Changed 2 years ago by dgoulet

Keywords: triage-out-030-201612 added
Milestone: Tor: 0.3.0.x-finalTor: 0.3.1.x-final

Triaged out on December 2016 from 030 to 031.

comment:2 Changed 2 years ago by asn

The goal of this ticket would be to refactor entry_guard_parse_from_state() (and family) to use the config/state parsing API, instead of the ad-hoc string parsing approach it currently uses.

As an example, see entry_guards_parse_state_for_guard_selection() and how it uses the config_line_t API. Is it more elegant?

comment:3 Changed 2 years ago by nickm

Is it more elegant?

IMO it isn't. It requires separate config_lines for anything, requires a loop over all the lines, and is harder to read as a function.

We have lots of places throughout our code that use a space-separated K=V metaformat, like FooPort lines and so on. It could be cool to refactor all of those, and this, to use a common parser.

comment:4 Changed 2 years ago by nickm

Milestone: Tor: 0.3.1.x-finalTor: unspecified
Points: 3

comment:5 Changed 2 years ago by nickm

Keywords: triage-out-030-201612 removed

comment:6 Changed 23 months ago by nickm

Keywords: torrc configuration technical-debt added
Note: See TracTickets for help on using tickets.